aftershock has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I use this FormBuilder in my project.

I have slight problemss, It looks like time-consuming to resolve.

1. I have a list of options, checkboxes, which are displayed using FormBuilder. How do I set so that values and displayed text differ? "options" sets everything. Is there a way of separating and setting the two separately?

2. I would like to implement my own validation for certain fields on the server-side and I need to be able to set certain fields manually that they are invalid. How do I do that?

3. I would like to add html code in checkbox labels, how do I do that? Currently, html code in labels somehow do not go through

Thanks.

Replies are listed 'Best First'.
Re: Problems with using Cgi::FormBuilder
by Anonymous Monk on Apr 09, 2012 at 01:05 UTC
      You guided towards the solution. The solution:
      $form->field( name => 'answers', label => 'Answers:', type => 'checkbox', multiple => 1, options => [['value','displayed1'],['value2','displayed2']] +, add_after_option => "<br>", linebreaks => 1, cleanopts => 0, validate => \&sub_call );

      See options solves 1.

      validate => \&sub_call solves 2.

      cleanopts solve 3.

      See options solves 1.
Re: Problems with using Cgi::FormBuilder
by ww (Archbishop) on Apr 08, 2012 at 20:04 UTC
    What have you tried?

    Show us your code.

    The Monks are much more inclined to provide instruction than to do your coding for free.