Results 1 to 2 of 2

Thread: Checking multiple form on one page

  1. #1
    Join Date
    Jun 2014

    Checking multiple form on one page

    I have a page with several forms. Each one with a radio group with values 'yes' and 'no'.

    Only one form on the page can and must contain the value 'yes'.

    All forms have the same id and all radios have the same name.

    Is this at all possible?

  2. #2
    Join Date
    Jun 2014
    This is not possible. IDs are UNIQUE.
    If you make multiple forms, give them a unique ID each.
    Control elements contained in a form can have a name which you already gave to another control element in another form since when you submit the form, only the values of the control elements inside that one form are sent to the server.
    If you want to submit all forms at once, you will have to use JS. You could serialize the forms into JSON and then send the JSON to your back-end. Multiple control elements with the same name will still work.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center