# Dom id on form\_remote\_tag

**URL:** <https://www.ruby-forum.com/t/dom-id-on-form-remote-tag/63107>\
**Category:** Rails\
**Created:** [June 12, 2006, 10:27am UTC](https://www.ruby-forum.com/t/dom-id-on-form-remote-tag/63107 "2006-06-12T10:27:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@seanb](https://www.ruby-forum.com/u/seanb)\
**Post date:** [June 12, 2006, 10:27am UTC](https://www.ruby-forum.com/t/dom-id-on-form-remote-tag/63107/1 "2006-06-12T10:27:53Z")

</div>

I want to make use of a form\_remote\_tag to submit a form  
asynchronously. Easy done. However, we also want to add an  
observe\_form tag to check for some value changes while the form is  
being entered.

The observe\_form tag needs a dom id to work on but I can’t see how to  
enter an html option for the dom id of the form on the  
form\_remote\_tag.

Any ideas?

Here is the form tag so far…

\<%=form\_remote\_tag :loading=\>“showProgress()”,  
:complete=\>“showForm()”,:url=\>{:action=\>:new,  
:controller=\>“sample\_controller”}, :update=\>“sampleForm”%\>

---

<div class="post-metadata">

**Author:** ![seanb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@seanb](https://www.ruby-forum.com/u/seanb)\
**Post date:** [June 12, 2006, 10:55am UTC](https://www.ruby-forum.com/t/dom-id-on-form-remote-tag/63107/2 "2006-06-12T10:55:15Z")

</div>

Use

\<%=form\_remote\_tag :loading=\>“showProgress()”,  
:complete=\>“showForm()”,:url=\>{:action=\>:new,  
:controller=\>“sample\_controller”}, :update=\>“sampleForm”,  
:html =\> {:id =\> ‘your-super-cool-id’}%\>

Last line is where it’s different

Hope this helps!  
Daniel

---

<div class="post-metadata">

**Author:** ![seanb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c0e974/32.png) [@seanb](https://www.ruby-forum.com/u/seanb)\
**Post date:** [June 12, 2006, 11:17am UTC](https://www.ruby-forum.com/t/dom-id-on-form-remote-tag/63107/3 "2006-06-12T11:17:09Z")

</div>

Excellent - that did the trick. Thanks for your help - the whole area  
of html options is not well-documented on the api page, the fact that  
it says html\_options and not html is misleading for starters.

Thanks again

Sean
