quform_get_value_for_storage

This filter hook is run on the element value before it is saved in the database. This hook can be used to encrypt values, which can later be decrypted using the quform_set_value_from_storage hook.

quform_get_value_for_storage

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

Example

1
2
3
4
5
add_action('quform_get_value_for_storage', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_encrypt_element_value($value);
 
    return $value;
}, 10, 3);
add_action('quform_get_value_for_storage', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_encrypt_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_get_value_for_storage_X

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

Example

12
3
4
5
add_action('quform_get_value_for_storage_1', function ($value, Quform_Element_Field $element, Quform_Form $form) {    $value = my_encrypt_element_value($value);
 
    return $value;
}, 10, 3);
add_action('quform_get_value_for_storage_1', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_encrypt_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_get_value_for_storage_X_X

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

Example

12
3
4
5
add_action('quform_get_value_for_storage_1_3', function ($value, Quform_Element_Field $element, Quform_Form $form) {    $value = my_encrypt_element_value($value);
 
    return $value;
}, 10, 3);
add_action('quform_get_value_for_storage_1_3', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    $value = my_encrypt_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. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy