Ajax error when using getValueHtml(checkboxfield)

Home Forums Quform WordPress Ajax error when using getValueHtml(checkboxfield)

This topic is: resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26364
    katw
    Participant

    Hi,

    An AJAX error occurs when I try the getValueHtml function on a checkbox field.

    The docs say this function handles arrays but I’m not sure.

    I can use the getValue() and getValueText() on the field but not getValueHtml().

    add_filter('quform_get_value_html_1_20', function ($value, Quform_Element_Field $element, Quform_Form $form) {
    
    		$orig = $value;
    		$fielddata = $form->getValue('quform_1_20');
    		$htmlformat = $form->getValueHtml('quform_1_20'); <--- won't work
    		return $value;
    }, 10, 3);
    #26456
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #26505
    katw
    Participant

    Makes sense.

    Suggest adding a note to the docs (getting-form-values-data-types) under “Get a single form value (for safe use in HTML)” saying NOT to use this method when used in conjunction with quform_get_value_html hook.

    #26545
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy