Skip to main content
Known Participant
November 29, 2008
Question

Forms within Forms

  • November 29, 2008
  • 3 replies
  • 433 views
First the easy question - is this possible?

Secondly what approach should I take / any pointers?

I have a job sheet page that for each job has accept / refuse buttons (one form, 2 submit buttons)

Once the job has been accepted that cell in the table becomes an allocate box (dropdown list and submit button)

I want to be able to allocate all jobs (i.e. change each dropdown box as required, then hit one (?any?) submit button but presumably this will need the whole page in a single form and then good use of array notation. Is this possible or will it interfere with my accept / refuse buttons?

Many thanks
Michael
    This topic has been closed for replies.

    3 replies

    Known Participant
    November 30, 2008
    THanks for the pointers.

    The accept/ refuse buttons need to be independant as they take the user off to a new screen to send replies etc.

    I'm starting to consider having a separate view (there are already 3 or 4 others) for allocating jobs, or possibly looking into changing the accept / refuse buttons into buttons rather than submit buttons within a form
    Inspiring
    November 30, 2008
    In addition to Mack's answer, you could use radio buttons instead of regular buttons for your accept/refuse choices. Then you could have a regular submit button at the end of the page.
    Inspiring
    November 30, 2008
    On 2008-11-30 01:59:31 +0200, "Mi-ul" <webforumsuser@macromedia.com> said:

    > First the easy question - is this possible?

    Not in HTML: http://www.w3.org/TR/html401/interact/forms.html#h-17.3


    > Secondly what approach should I take / any pointers?
    >
    > I have a job sheet page that for each job has accept / refuse buttons (one
    > form, 2 submit buttons)
    >
    > Once the job has been accepted that cell in the table becomes an allocate box
    > (dropdown list and submit button)
    >
    > I want to be able to allocate all jobs (i.e. change each dropdown box as
    > required, then hit one (?any?) submit button but presumably this will need the
    > whole page in a single form and then good use of array notation. Is this
    > possible or will it interfere with my accept / refuse buttons?

    There are multiple solutions in this case (list contains just pointers
    and it's not exhaustive):
    - use javascript to set a hidden field with the id of the job when
    accept/refuse is clicked then submit the form. In the action page if
    the hidden field has a value then it's accept/refuse id;
    - use javascript on accept/refuse something like:
    window.location.href='update_accept_status.cfm?status=accept/refuse';
    - use ajax to send the status to the server, get the html with the
    dropdown and submit button and replace the current html.

    --
    Mack