The tricky part is I dont really want to create a separe page for each field because i have over 20 of them.

You can probably get by with a small number of generic edit pages, depending on the type of data you'll be editing. (If everyhing can be editing in a 20 character field, you can use a single edit page).

Here's how it works: You already have a form that contains some number of visible and invisible fields. Add alternate "Submit" buttons labeled "Edit". Give these buttons the name of the field you want to edit (or some name from which the target field name can be derived).

When one of these buttons is pressed, it submits the form. The CGI that catches the submit needs to recognize that an edit button was pressed (as opposed to an "I'm done with this page" button), and respond by producing an HTML page that includes a form. The form has an edit field for the field being editing, and all other form values hidden. The form action for this page is a CGI that handles the edit, and redirects back to something that will regenerate the page you started out on (e.g., your "confirmation" page).


In reply to Re: Re: Re: Assign perl value in html link by dws
in thread Assign perl value in html link by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.