Jump to content

Element Not Allowed?


ShadowMage

Recommended Posts

According the W3 Validator this code is wrong:

<form name='DetailSummary' action='Scripts/SaveScripts/SaveSkylightDtl.php' method='post'><input type='hidden' name='Type' id='SkylightType' value='WPnls' /><input type='hidden' name='Desc' id='SkylightDesc' value='Wall Panels' /><input type='hidden' name='QuoteNum' id='QuoteNum' value='99123-1' /><input type='hidden' name='SetNum' id='SetNum' value='4' />....</form>

It says that the inputs are not allowed where I have them. Is this true? I didn't think it mattered.Can anyone clear this up for me?Thanks,jkloth

Link to comment
Share on other sites

The <input> elements need to be wrapped in a block element, like <fieldset> or <div>.You can't have text or inline elements directly inside a <form> element.

Link to comment
Share on other sites

Thanks for clearing that up Ingolme. Which do you recommend fieldset or div?Also on a somewhat unrelated note, the validator is telling me there is no name attribute for forms. Which makes sense since it's deprecated, but without a name can I still POST it to a PHP script? Same for inputs. If they don't have a name can they still be POSTed?

Link to comment
Share on other sites

Thanks for clearing that up Ingolme. Which do you recommend fieldset or div?Also on a somewhat unrelated note, the validator is telling me there is no name attribute for forms. Which makes sense since it's deprecated, but without a name can I still POST it to a PHP script? Same for inputs. If they don't have a name can they still be POSTed?
The form doesn't need a name. What would you use it for? Just erase the name attribute from the form.The input elements can keep the name attribute, they need it, the validator won't complain.The <fieldset> element just defines a series of input fields, so it's best to use that.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...