>
> I know nested form is not allowed in html, however I have a need for that,


That's a fun statement... I know the spec doesn't allow it but I'm going to
do it anyway...

Why do you need a nested form? Can you just add the fields you want without
the form? If your possibilities are limited enough then just render them all
in the page and disable/hide the ones you don't want submitted and use
plain-old-javascript to switch them out.

I think in general it's a bad idea to do what you are asking for (sub-form)
because each random browser could handle it differently. For instance, what
happens when someone hits enter in your city text field? Is the inner form
submitted, or the outerform? When you submit the outer form, are the inner
forms fields going to be submitted too?

Good luck,
Josh


On 10/22/07, Angelo Chen <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I know nested form is not allowed in html, however I have a need for that,
> I
> have a sub form embedded in the main form, the sub form will be replaced
> by
> Ajax calls to obtain more specific forms depending on the country field,
> the
> UI works quite well, but there is no way for me to access those form
> fields
> in the sub form but I do have a Form variable pointing at sub form, you
> can
> see from the code/template below:
>
> @Component
> private Form form_info;
>
> @Component
> private Form form_sub;
>
> <t:form t:id="main">
> <label for="country">Country<input t:type="select"  t:id="country"
> t:model="CountryList"/></label>
> <div id="replacable">
>   <t:form t:id="sub">
>          <label for="city">City<input t:type="textfield" t:id="city"
> size="20"
> /></label>
> </t:form>
>
> </div>
> <input t:type="submit" name="Submit" t:id="Submit" value="Submit"/>
> </t:form>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/T5%3A-accessing-fields-in-a-nested-form--tf4670540.html#a13342288
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.

Reply via email to