quform_set_value_from_storage

This filter hook is run on the element value after it has been retrieved from the database, but before the value is set on the element instance. This hook can be used to decrypt values, if they are encrypted with the quform_get_value_for_storage hook.

quform_set_value_from_storage

This filter hook is run on all form element values in all forms.

Example

1
2
3
4
5
add_action('quform_set_value_from_storage', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_decrypt_element_value($value);
 
    return $value;
}, 10, 3);
add_action('quform_set_value_from_storage', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_decrypt_element_value($value);

    return $value;
}, 10, 3);

Parameters

  • $valuestring – the element value in storage format
  • $elementQuform_Element_Field – the element instance
  • $formQuform_Form – the form instance

quform_set_value_from_storage_X

This filter hook is run on all form element values in a single form.

Example

12
3
4
5
add_action('quform_set_value_from_storage_1', function ($value, Quform_Element_Field $element, Quform_Form $form) {    $value = my_decrypt_element_value($value);
 
    return $value;
}, 10, 3);
add_action('quform_set_value_from_storage_1', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_decrypt_element_value($value);

    return $value;
}, 10, 3);
  • On line 1, replace the number 1 with the form ID

Parameters

  • $valuestring – the element value in storage format
  • $elementQuform_Element_Field – the element instance
  • $formQuform_Form – the form instance

quform_set_value_from_storage_X_X

This filter hook is run on a single form element value.

Example

12
3
4
5
add_action('quform_set_value_from_storage_1_3', function ($value, Quform_Element_Field $element, Quform_Form $form) {    $value = my_decrypt_element_value($value);
 
    return $value;
}, 10, 3);
add_action('quform_set_value_from_storage_1_3', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_decrypt_element_value($value);

    return $value;
}, 10, 3);

Parameters

  • $valuestring – the element value in storage format
  • $elementQuform_Element_Field – the element instance
  • $formQuform_Form – the form instance

See also

Be inspired. © 2019 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy