Filter options (Advanced) in regards to "allowWhiteSpace"

Home Forums Quform PHP Filter options (Advanced) in regards to "allowWhiteSpace"

This topic is: resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8271
    hortondesigns
    Participant

    I want to allow white spaces in form fields. Here is the error I am receiving:
    There was a problem

    Catchable fatal error: Argument 1 passed to Quform_Element::addFilters() must be an array, string given, called in /home2/hikerex1/public_html/winstage.usinsurance-agency.com/quform/process-contact-us.php on line 206 and defined in /home2/hikerex1/public_html/winstage.usinsurance-agency.com/quform/lib/Quform/Element.php on line 231

    222 $address2 = new Quform_Element(‘address2’, ‘Address’);
    223 $address2->addFilter(‘trim’);
    224 $address2->addFilter(array(‘allowWhiteSpace’ => true));
    225 $form->addElement($address2);

    231 $city = new Quform_Element(‘city’, ‘City’);
    232 $city->addFilter(‘trim’);
    233 $city->addFilters(‘alpha’, array(‘allowWhiteSpace’ => true));
    234 $form->addElement($city);

    I tried to follow the documentation. Need help!

    #8288
    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.

    • This reply was modified 10 years, 3 months ago by Ally. Reason: the address should probably use alphaNumeric to allow numbers
    #8328
    hortondesigns
    Participant

    Thanks Ally! My form is working properly without any errors. 🙂

Viewing 3 posts - 1 through 3 (of 3 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