Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: HTML::Template with checkbox

by rpnoble419 (Pilgrim)
on Sep 05, 2012 at 03:14 UTC ( #991730=note: print w/replies, xml ) Need Help??


in reply to HTML::Template with checkbox

I agree with choroba, your issue is not a Perl one. I would add a value to each of your check boxes and use the file name, this way when you click on a check box, the file name will be the returned value. If you use a unique name for each check box then the files will be returned as individual parameters. If you use the same name then the file names will be returned using a single parameter. Use CGI.pm to sort out the parameters. If you go the same name route, CGI.pm will return all of the filenames in a single array....
<td><input type="checkbox" name="field" <TMPL_VAR NAME="check"> value= +"<TMPL_VAR NAME ="filename">"

Replies are listed 'Best First'.
Re^2: HTML::Template with checkbox
by bebewinla (Novice) on Sep 05, 2012 at 16:07 UTC

    Could you show me how to get the the names of checkbox or filenames with your added value="<TMPL_VAR NAME ="filename">"

        I used it and it did not return any values

        @files = $q->param("field");

        There is no values in @files.

        I feel very frustrated.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://991730]
help
Chatterbox?
[PriNet]: go figure, i just tried that, it retains some of the values (not the key) of the pre-assigned value
[PriNet]: i guess i'll just have to use two seperate hashes, there are two, but one is larger than the other, and when i reference the smaller one, it holds onto the values that were assigned to the larger hash (the keynames change, but unless i reassign a new valu

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2017-06-28 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (619 votes). Check out past polls.