"your message" as required

Home Forums Quform PHP "your message" as required

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Ally 5 days, 15 hours ago.

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.