# Form\_remote\_tag :confirm tag

**URL:** <https://www.ruby-forum.com/t/form-remote-tag-confirm-tag/114106>\
**Category:** Rails\
**Created:** [September 7, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/form-remote-tag-confirm-tag/114106 "2007-09-07T23:23:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 7, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/form-remote-tag-confirm-tag/114106/1 "2007-09-07T23:23:51Z")

</div>

\<% form\_remote\_tag(  
:url =\> { :action =\> ‘add\_items’, :id =\> @vtl.id},  
:html =\> {:id =\> ‘add\_items\_form’},  
:confirm =\> “Are you sure stuff” ) do %\>

That is the generic form\_remote\_tag that i have used so far.

But, in one case, I have to conditional pop up the confirm dialog. If  
a, use this form and pop-up the dialog and if b, use this form without  
the dialog. How can I do that without using a if-else statement? I do  
not want to duplicate the same code one with the :confirm case and the  
other without.

Any ideas?
