Undefined idex: mandatory - Error message on above the form

Created on 14 October 2013, about 11 years ago
Updated 28 February 2023, almost 2 years ago

Ok.... I have the signature field showing up and it is saving.... but there is this error showing on the content page that shows the form:

Notice: Undefined index: mandatory in _webform_render_signaturefield() (line 99 of /home/******/public_html/******/sites/all/modules/signaturefield/includes/webform.inc).

I looked in the webform.inc file and on line 99, it says this: '#required' => $component['mandatory'],

Which came from this block of code:

function _webform_render_signaturefield($component, $value = NULL) {
  $form_item = array(
    '#type' => 'signaturefield',
    '#title' => $component['name'],
    '#required' => $component['mandatory'],
    '#weight' => $component['weight'],
    '#color' => $component['extra']['color'],
    '#width' => $component['extra']['width'],
    '#height' => $component['extra']['height'],
    '#description' => isset($component['extra']['description']) ? _webform_filter_descriptions($component['extra']['description']) : '',
    '#default_value' => $component['value'],
    '#prefix' => '<div class="form-item webform-component-' . $component['type'] . '" id="webform-component-' . $component['form_key'] . '">',
    '#suffix' => '</div>',
  );

Any idea how to fix that? When I searched it, Google came up completely dry.

You can view the test form here: http://demo.despaindesigns.com/drupal7/?q=node/2

The signature is on the last page of the form.

Thank you,

Jennifer

πŸ’¬ Support request
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Evangeline93

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024