"your message" as required

Home Forums Quform PHP "your message" as required

This topic is: not resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27130
    ds
    Participant

    Hello – I want to make the “your message” textarea as a required field, with it’s own error message.

    I tried it like this – but it’s not working:
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    $textarea = new Quform_Element(‘textarea’, ‘Ihre Nachricht an uns’);
    $textarea->addFilter(‘trim’);
    $textarea->addValidator(‘required’, array(
    ‘messages’ => array(‘required’ => ‘Bitte geben Sie eine Nachricht ein’)
    ));
    $form->addElement($textarea);
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    URL: http://body-brain-index.de/axel-hengst-neu/kontakt.php
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    So – what did I wrong?
    Regards
    Daniel

    #27144
    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 2 posts - 1 through 2 (of 2 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