0

I am using the freeform_module_admin_notification hook and the documentation indicates that the field contents should be available:

$this->fields (array) - output data of fields by fieldname

But the fields array contains the 'Field Label' of the field keyed by the Field Name.Not the value entered in the form by the user.

For example I have defined a text field in the admin panel for the module, it is called 'name' and the Field Label is 'Name' I have included it on a form:

<input type="text" id="name" name="name" class="input-1" />

But the value I get within the extension is 'Name' not the value entered in the field.

$fields['name'] has a value of Name

Anyone any idea if this is a bug or I am just doing something wrong?

Thanks

Andrew

1 Answer 1

0

I believe you want to look at $variables, not $fields - specifically, $variables['field_inputs'] and/or $variables['field_outputs']

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.