FAQ
Hi,
I have put in a 'submit' and a 'cancel' button on my form. No field needs to
be filled in and no validation is necessary when the cancel button is
clicked. One can make FormBuilder skip the validation by just not including
it in the code.

code for the 'submit' button:

if ($self->formbuilder->submitted eq 'Submit' &&
$self->formbuilder->validate) {
- do something -
}

code for the 'cancel' button:

if ($self->formbuilder->submitted eq 'Cancel') {
- do nothing -
}

I am, however, unable to get FormBuilder to not insist on the required
fields being filled in when the form is cancelled. How can one do that?

jagdish eashwar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080709/d630936e/attachment.htm

Search Discussions

  • Jagdish eashwar at Jul 9, 2008 at 2:00 pm
    Hi,

    I got the answer in the intermediate tutorial at formbuilder .org. A small
    piece of code called jsfunc is to be input into the form definition. The
    code I mentioned in my earlier mail simply skipped checking whether the form
    had been validated on the server side; the javascript would have still
    insisted on validation. With jsfunc in place, that is also overcome.

    jagdish
    On Wed, Jul 9, 2008 at 5:58 AM, jagdish eashwar wrote:

    Hi,
    I have put in a 'submit' and a 'cancel' button on my form. No field needs
    to be filled in and no validation is necessary when the cancel button is
    clicked. One can make FormBuilder skip the validation by just not including
    it in the code.

    code for the 'submit' button:

    if ($self->formbuilder->submitted eq 'Submit' &&
    $self->formbuilder->validate) {
    - do something -
    }

    code for the 'cancel' button:

    if ($self->formbuilder->submitted eq 'Cancel') {
    - do nothing -
    }

    I am, however, unable to get FormBuilder to not insist on the required
    fields being filled in when the form is cancelled. How can one do that?

    jagdish eashwar
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080709/c9771783/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJul 9, '08 at 1:28a
activeJul 9, '08 at 2:00p
posts2
users1
websitecatalystframework.org
irc#catalyst

1 user in discussion

Jagdish eashwar: 2 posts

People

Translate

site design / logo © 2022 Grokbase