Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

HTML::Template & HTML Elements

by BlenderHead (Novice)
on May 31, 2009 at 02:23 UTC ( #767098=perlquestion: print w/replies, xml ) Need Help??
BlenderHead has asked for the wisdom of the Perl Monks concerning the following question:

Hello Everyone:

I am intermediate level Perl programmer, but this is my first post here, so please bear with me for being new.

I dont have any simple example for this question, so I'll just have to talk it out. Hopefully, it will make sense enough to answer.

Am working on a CGI app using HTML::Template. It gets the user to complete a fill out form with text fields, radio buttons and a pulldown menu. After the form is completed it reposts the information (in a validation phase) and offers the author the option to edit the input. The problem occurs when the user wishes to edit the information.

When the user clicks "Edit" the idea is for them to refer back to the form with the previously inserted information. It is easy enough to pass the parameters back into the text fields, but the information in the radio buttons and pull down menus isn't resetting those fields to where the user left off.

Anyone have any ideas on how to handle this?



Replies are listed 'Best First'.
Re: HTML::Template & HTML Elements
by almut (Canon) on May 31, 2009 at 03:12 UTC
    ...but the information in the radio buttons and pull down menus isn't resetting those fields to where the user left off.

    Are you setting the appropriate CHECKED attribute (for radio buttons) and SELECTED (for option menus)?

    BTW, has a "sticky" form fields facility, which should do just about that automagically.  (Update: ah well, on second read I realize you're using HTML::Template for HTML generation (it's even in the title! :) — so ignore that note about )

Re: HTML::Template & HTML Elements
by jonnyfolk (Vicar) on May 31, 2009 at 06:30 UTC
    The information here might be useful.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://767098]
Approved by GrandFather
[marioroy]: Tie::IxHash can be shared. Also similar modules. I cannot wait to post a solution sharing Tie::File and iterating among workers.
[marioroy]: Lady_Aleena Yes, will post something with all the new features. Parallel with few lines of code.
[marioroy]: Yes, will do for PM. I love PM.
Lady_Aleena ponders a meditation of her own, but it would be on a far far less important topic.
[marioroy]: I'm hoping to have a release in about a week's time.
Discipulus supermario..
marioroy MCE isn't important by any means. Just wanted to complete this task. Hobo needed more love and MCE::Shared as well. It wasn't easy at all.
[marioroy]: Discipulus No supermario. I'm a humbled person within. Just wanted to complete this journey.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-05-26 08:56 GMT
Find Nodes?
    Voting Booth?