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

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.

edited: Mon Jul 14 23:04:40 2003 by jeffa - title change (was: Multi-forms in CGI.pm)

Replies are listed 'Best First'.
Re: Read only fields in a CGI form
by tcf22 (Priest) on Jul 13, 2003 at 23:02 UTC
    Depending on what type of input field it is you can use, READONLY, DISABLED, etc.., which will show the fields, but won't allow them to be edited.
Re: Read only fields in a CGI form
by fglock (Vicar) on Jul 14, 2003 at 03:55 UTC

    Input:
    read-only

    <table> <tr> <td>Input: </td> <td> <table border=1 bgcolor=lightgray> <tr><td> read-only </td></tr> </table> </td> </tr> </table>