OT: Form Submit w/radio button

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

OT: Form Submit w/radio button

rdwyer
Hello List.

Is there a way to pass a radio button value in a form if the radio  
button control is outside the form?  I have 3 buttons for 3 different  
forms on one page and want them all to pass a radio button value that  
is located outside all three forms when each button is clicked.

Thanks,
Rick

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

Bil Corry-3
Rick Dwyer wrote on 9/30/2008 1:26 PM:
> Is there a way to pass a radio button value in a form if the radio
> button control is outside the form?  I have 3 buttons for 3 different
> forms on one page and want them all to pass a radio button value that is
> located outside all three forms when each button is clicked.

You can using JavaScript.  Create a hidden text field in each of the forms, then whenever the radio value changes, update all three hidden fields with the new value.  Then when the form is submitted, it'll submit the hidden field containing the current radio value.


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

Viaduct Productions
In reply to this post by rdwyer
Remember that radio button groups MUST have one choice, even upon  
load.  Radios should never have a zero choice presence.  So by  
default you should have one chosen.  You can manipulate that choice  
anywhere you like, however you like, but submission should definitely  
have a default, even if it is a "zero" or something alternative.

So yes, you can JS outside of the form.

On Sep 30, 2008, at 2:26 PM, Rick Dwyer wrote:

> Hello List.
>
> Is there a way to pass a radio button value in a form if the radio  
> button control is outside the form?  I have 3 buttons for 3  
> different forms on one page and want them all to pass a radio  
> button value that is located outside all three forms when each  
> button is clicked.


Rich in Toronto
...now go get on your bike


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

rdwyer
In reply to this post by Bil Corry-3
Thanks Bil,
I had a feeling JS would be the answer.
Rick

On Sep 30, 2008, at 2:30 PM, Bil Corry wrote:

> Rick Dwyer wrote on 9/30/2008 1:26 PM:
>> Is there a way to pass a radio button value in a form if the radio
>> button control is outside the form?  I have 3 buttons for 3 different
>> forms on one page and want them all to pass a radio button value  
>> that is
>> located outside all three forms when each button is clicked.
>
> You can using JavaScript.  Create a hidden text field in each of the  
> forms, then whenever the radio value changes, update all three  
> hidden fields with the new value.  Then when the form is submitted,  
> it'll submit the hidden field containing the current radio value.
>
>
> - Bil
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

Greg Hemphill
In reply to this post by Bil Corry-3
BTW... I hear HTML 5 will allow you to name elements and forms... so  
you can have form elements outside the form tags.


On Sep 30, 2008, at 2:30 PM, Bil Corry wrote:

> Rick Dwyer wrote on 9/30/2008 1:26 PM:
>> Is there a way to pass a radio button value in a form if the radio
>> button control is outside the form?  I have 3 buttons for 3 different
>> forms on one page and want them all to pass a radio button value  
>> that is
>> located outside all three forms when each button is clicked.
>
> You can using JavaScript.  Create a hidden text field in each of the  
> forms, then whenever the radio value changes, update all three  
> hidden fields with the new value.  Then when the form is submitted,  
> it'll submit the hidden field containing the current radio value.
>
>
> - Bil
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

rdwyer

On Sep 30, 2008, at 2:37 PM, Greg Hemphill wrote:

> BTW... I hear HTML 5 will allow you to name elements and forms... so  
> you can have form elements outside the form tags.

That would very useful.   When is HTML 5 expected to be supported?



>
>
>
> On Sep 30, 2008, at 2:30 PM, Bil Corry wrote:
>
>> Rick Dwyer wrote on 9/30/2008 1:26 PM:
>>> Is there a way to pass a radio button value in a form if the radio
>>> button control is outside the form?  I have 3 buttons for 3  
>>> different
>>> forms on one page and want them all to pass a radio button value  
>>> that is
>>> located outside all three forms when each button is clicked.
>>
>> You can using JavaScript.  Create a hidden text field in each of  
>> the forms, then whenever the radio value changes, update all three  
>> hidden fields with the new value.  Then when the form is submitted,  
>> it'll submit the hidden field containing the current radio value.
>>
>>
>> - Bil
>>
>>
>> --
>> This list is a free service of LassoSoft: http://www.LassoSoft.com/
>> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
>> Manage your subscription: http://www.ListSearch.com/Lasso/
>>
>
>
> --
> This list is a free service of LassoSoft: http://www.LassoSoft.com/
> Search the list archives: http://www.ListSearch.com/Lasso/Browse/
> Manage your subscription: http://www.ListSearch.com/Lasso/
>


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

stevepiercy
In reply to this post by rdwyer
You could use CSS to display parts of the form wherever you like.

<form>
    <div id="myform">
    // main form stuff goes here, and CSS renders it inline
    </div>
    <div id="myradio">
    // radio button goes here, use CSS positioning to place it wherever you like on the page.  You could even go nuts with a scrolling div like the "Map, don't follow me!" on yelp.com
    http://www.yelp.com/search?find_desc=taqueria&find_loc=san+francisco%2C+ca
    </div>
</form>

--steve

On Tuesday, September 30, 2008, [hidden email] (Rick Dwyer) pronounced:

>Hello List.
>
>Is there a way to pass a radio button value in a form if the radio  
>button control is outside the form?  I have 3 buttons for 3 different  
>forms on one page and want them all to pass a radio button value that  
>is located outside all three forms when each button is clicked.
>
>Thanks,
>Rick
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>

--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/

Reply | Threaded
Open this post in threaded view
|

Re: OT: Form Submit w/radio button

Bil Corry-3
In reply to this post by rdwyer
Rick Dwyer wrote on 9/30/2008 1:43 PM:
>
> On Sep 30, 2008, at 2:37 PM, Greg Hemphill wrote:
>
>> BTW... I hear HTML 5 will allow you to name elements and forms... so
>> you can have form elements outside the form tags.
>
> That would very useful.   When is HTML 5 expected to be supported?

Sooner than 2022, which was the big mixup a couple of weeks ago:

        http://blog.whatwg.org/two-thousand-twenty-two


- Bil


--
This list is a free service of LassoSoft: http://www.LassoSoft.com/
Search the list archives: http://www.ListSearch.com/Lasso/Browse/
Manage your subscription: http://www.ListSearch.com/Lasso/