Forms

S

shapper

Hello,

Can I have two forms in a page?

And can I have one form inside another form?

Thanks,
Miguel
 
J

Jukka K. Korpela

shapper said:
Can I have two forms in a page?

Yes. Why not? Apart from common sense, which says that it's not usually a
good idea.
And can I have one form inside another form?

No. Even the HTML syntax forbids it.

Now, what is your _real_ problem? What did you plan to achieve by having
nested forms?
 
S

shapper

Yes. Why not? Apart from common sense, which says that it's not usually a
good idea.


No. Even the HTML syntax forbids it.

Now, what is your _real_ problem? What did you plan to achieve by having
nested forms?

On a system to manage users, some users are professors.
So I have a form to edit the CV of the professor but also a form to
Add and Remove Themes that the professor lectures.

I would like to have both forms on the same page ... in this case it
makes sense
So on form one I would have:
- input CV
- input Notes
- input Save button

And on second form I would have:
- select Themes
- checkboxes Levels
- input Notes
- input Add button
And a list after it with the subscribed themes

I think it makes sense to have this on the same page.

The nested form was just curiosity ...
 
J

Jukka K. Korpela


If you quote signatures on regular basis, you might end up with getting
ignored on a regular basis.
On a system to manage users, some users are professors.
So I have a form to edit the CV of the professor but also a form to
Add and Remove Themes that the professor lectures.

These are both operations on data about an individual, so it might make
sense to have both kinds of operations on the same page. But why not in the
same form?
I would like to have both forms on the same page ... in this case it
makes sense
So on form one I would have:
- input CV
- input Notes
- input Save button

And on second form I would have:
- select Themes
- checkboxes Levels
- input Notes
- input Add button
And a list after it with the subscribed themes

I think it makes sense to have this on the same page.

Quite possibly, but the normal way of doing such things is a single form,
with an action like "Update", which updates whatever information has been
entered. If you use two forms, then there is no reliable way of making them
share some input fields.

Using a single form implies that the server-side form data handler must be
capable of dealing with any data (as it should anyway) and specifically
process different fields, performing several updates in one transaction.
The nested form was just curiosity ...

I see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top