# Are form\_remote\_tag and submit\_to\_remote mutually exclusive?

**URL:** <https://www.ruby-forum.com/t/are-form-remote-tag-and-submit-to-remote-mutually-exclusive/65078>\
**Category:** Rails\
**Created:** [August 16, 2006, 12:01am UTC](https://www.ruby-forum.com/t/are-form-remote-tag-and-submit-to-remote-mutually-exclusive/65078 "2006-08-16T00:01:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [August 16, 2006, 12:01am UTC](https://www.ruby-forum.com/t/are-form-remote-tag-and-submit-to-remote-mutually-exclusive/65078/1 "2006-08-16T00:01:32Z")

</div>

Do I need to use submit\_to\_remote in conjunction with or instead of  
form\_remote\_tag? The description in the API docs. is confusing.

Is the combination of form\_tag/submit\_to\_remote valid?

Is the combination of from\_remote\_tag/submit\_tag valid?

Thanks,  
Wes

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [August 16, 2006, 3:59am UTC](https://www.ruby-forum.com/t/are-form-remote-tag-and-submit-to-remote-mutually-exclusive/65078/2 "2006-08-16T03:59:36Z")

</div>

Wes G. wrote:

> Do I need to use submit\_to\_remote in conjunction with or instead of  
> form\_remote\_tag? The description in the API docs. is confusing.
> 
> Is the combination of form\_tag/submit\_to\_remote valid?
> 
> Is the combination of from\_remote\_tag/submit\_tag valid?
> 
> Thanks,  
> Wes

The regular submit tag works fine with form\_remote\_tag. I think the  
submit\_to\_remote tag is there so that you can do ajax for one button in  
a regular form. You could use it for some help with the form, like  
explaining the minimum acceptable password conditions in a signup form,  
or explaining the three digit code thing on the back of a credit card,  
by sliding in some help text or something - while making the main form  
submit a non-ajax regular old form.

I’m a newbie, so this is just a guess. I’ve definitely had good results  
with submit\_tag together with form\_remote\_tag. Haven’t had a reason to  
use the submit\_to\_remote yet.

best,  
jp

---

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [August 16, 2006, 4:28am UTC](https://www.ruby-forum.com/t/are-form-remote-tag-and-submit-to-remote-mutually-exclusive/65078/3 "2006-08-16T04:28:19Z")

</div>

> Wes G. wrote:
> 
> > Do I need to use submit\_to\_remote in conjunction with or instead of  
> > form\_remote\_tag? The description in the API docs. is confusing.
> > 
> > Is the combination of form\_tag/submit\_to\_remote valid?
> > 
> > Is the combination of from\_remote\_tag/submit\_tag valid?

submit\_to\_remote writes the submit tag HTML in such a way that it  
doesn’t submit the form, it just kicks off whichever Ajax stuff you  
give it. form\_remote\_tag writes the form tag in the same way.

so if you’re doing a submit\_to\_remote, it won’t matter at all what’s  
in the form tag, since the form tag’s stuff will never be invoked.  
that means the answer to both your questions is yes. if you use  
form\_remote\_tag with submit\_tag, that’s totally valid, and form\_tag  
with submit\_to\_remote is valid too – the submit\_to\_remote simply  
bypasses the form\_tag, so it doesn’t matter what’s in there.
