Fatal Error message -validation

Home Forums Quform PHP Fatal Error message -validation

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  Ally 2 months, 2 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #27425

    bb3
    Participant

    Hi Ally,
    I got a fatal error messsage, but I know what caused it … I have an input field for a person’s address, but it’s just a single field – a textarea box.
    I’m not doing validation right on this field in the process php. If I comment out the validation line on that entry, the form works fine.
    I’ve tried a few different options with it, but I’m still not doing it right.

    Help appreciated
    Thanks
    Also got this: Does it matter?
    Deprecated: __autoload() is deprecated, use spl_autoload_register() instead in /public_html/quform/lib/PHPMailerAutoload.php on line 45

    #27433

    bb3
    Participant

    I finally got it working!
    In case it ever becomes an issue for anyone else, I’ve included the php which worked for me to validate a textarea. It’s actually given in the process validators file but took me a long time to realise it.

    $address = new Quform_Element(‘address’, ‘Address’);
    $address->addFilters(array(‘trim’));
    $address->addValidator(‘required’);
    $form->addElement($address);

    Still somewhat confused though on the naming rules for the above entry. On one part of the documentation, (an example with a fax-number entry) it says all parts to change must match the ‘name’ in the html.
    Elsewhere it says the ‘name’ and ‘label’ must be used. Screenshots attached.

    Attachments:
    You must be logged in to view attached files.
    #27498

    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 2 months, 2 weeks ago by  Ally.
    #27499

    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.

    #27508

    bb3
    Participant

    Hi Ally,
    Thanks for that detailed explanation. I get the picture now with the naming rules in the php element entry. The bit after the $ symbol was the main source of confusion … the rest ‘name’ and ‘label’ were obvious enough.

    Your explanation is much better than in the documentation, which I still think is confusing … particularly the fax-number example (attached) which I thought I had sent already – it seems to suggest all the names have to be exactly the same.

    Good to have it sorted.
    Much appreciated

    On the Deprecated error: The version of PHP, on the hosting I use, is version 7 as far as I recall. Think there is an option to change it … but, everything seems to work ok as is, so, happy enough to leave it alone.

    Attachments:
    You must be logged in to view attached files.
    #27535

    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 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

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