Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > multi-part forms in CGI.pm

Reply
Thread Tools

multi-part forms in CGI.pm

 
 
Zak
Guest
Posts: n/a
 
      07-13-2003
Hi,
I am a new comer to CGI.pm and find it extremely useful. I have created
multi-form pages and with little struggle have succesfully been able to save
states from one form to another (from one page to another). Two groups of
people will be using the mutli-form pages to fill out the fields.
GROUP A fills out pages 1, 2, 3.
GROUP B fills out pages 4, 5.
I have used save_parameters and restore_parameters to bring back the forms
partially filled out. My dilemma now is:
when I bring the forms back for the second group (GROUP B) to fill out their
sections (page 4, 5), I want to "gray" sections 1, 2, 3 (pages 1, 2, 3 in
view access only but not hide them) that Group A had already filled. Not
give GROUP B access to enter text in fields for pages 1, 2, 3 but be able to
display information. I don't want to use hidden() because it would hide the
fields entriely. I want to display fields in pages 1, 2, 3 in view mode only
for GROUP B but give them write access to pages 4,5.

restore_parameters bring all pages and all fields in write access.

Does anyone have an idea how manipulate this one? Any help is appreciated.
Thanks.


 
Reply With Quote
 
 
 
 
Sam Holden
Guest
Posts: n/a
 
      07-13-2003
On Sun, 13 Jul 2003 22:43:11 GMT, Zak <(E-Mail Removed)> wrote:
> Hi,
> I am a new comer to CGI.pm and find it extremely useful. I have created
> multi-form pages and with little struggle have succesfully been able to save
> states from one form to another (from one page to another). Two groups of
> people will be using the mutli-form pages to fill out the fields.
> GROUP A fills out pages 1, 2, 3.
> GROUP B fills out pages 4, 5.
> I have used save_parameters and restore_parameters to bring back the forms
> partially filled out. My dilemma now is:
> when I bring the forms back for the second group (GROUP B) to fill out their
> sections (page 4, 5), I want to "gray" sections 1, 2, 3 (pages 1, 2, 3 in
> view access only but not hide them) that Group A had already filled. Not
> give GROUP B access to enter text in fields for pages 1, 2, 3 but be able to
> display information. I don't want to use hidden() because it would hide the
> fields entriely. I want to display fields in pages 1, 2, 3 in view mode only
> for GROUP B but give them write access to pages 4,5.
>
> restore_parameters bring all pages and all fields in write access.
>
> Does anyone have an idea how manipulate this one? Any help is appreciated.
> Thanks.


By outputting the appropriate HTML for those fields.

I doubt CGI.pm will do that for you (though I could be wrong, check the
CGI.pm. perldoc CGI, documentation to be sure). So you will probably
have to add the appropriate HTML to the field before outputting it,
CGI.pm allows you to set arbitrary attributes I believe (though you're
code would have to decide on which fields to do so).

What those attributes are (and whether there is such a standard
attribute or if you need to dive into browser specific extensions) is
something you can probably find out in one of the html newsgroups, such
as comp.infosystems.www.authoring.html.

--
Sam Holden

 
Reply With Quote
 
 
 
 
Rod
Guest
Posts: n/a
 
      07-14-2003


this is,partly anyway, an HTML question - in order to create a
'read-only' input field pre-filled with prior data you simply add the
'disabled attribute for that input field in the form definition.
something like.

<input name="textfield" type="text" value="textcheck" disabled >

You'll have to check out the latest documentation on CGI.pm to see if
caters for this - I also have a feeling it doesn't. also I have only
checked the above snippet on post IE4 browsers.

You should also check that any 'disabled fields' actually return form
data - in the spec. I've read they don't - (ie they really are
disabled) - this may not make a difference to you, but it's good to
know anyway.

Good luck
>Hi,
> I am a new comer to CGI.pm and find it extremely useful. I have created
>multi-form pages and with little struggle have succesfully been able to save
>states from one form to another (from one page to another). Two groups of
>people will be using the mutli-form pages to fill out the fields.


personal replies to http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
forms authentication -- expired forms cookie vs. not provided forms cookie Eric ASP .Net Security 2 01-27-2006 10:09 PM
embedded windows forms into web forms for control =?Utf-8?B?ZGF2aWQ=?= ASP .Net 2 04-10-2005 01:07 PM
Creating ASP.NET forms, that act like HTML forms jlopes151 ASP .Net 2 03-14-2005 01:01 AM
Forms Authentication question: How to have some pages open and some requiring forms authentication Eric ASP .Net 2 02-13-2004 02:14 PM
Web Forms VS Windows Forms Brendan Miller ASP .Net 2 08-11-2003 09:05 PM



Advertisments