# Form\_remote\_tag conditional submit

**URL:** <https://www.ruby-forum.com/t/form-remote-tag-conditional-submit/116326>\
**Category:** Rails\
**Created:** [October 4, 2007, 2:33pm UTC](https://www.ruby-forum.com/t/form-remote-tag-conditional-submit/116326 "2007-10-04T14:33:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shishir\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@shishir\_s](https://www.ruby-forum.com/u/shishir_s)\
**Post date:** [October 4, 2007, 2:33pm UTC](https://www.ruby-forum.com/t/form-remote-tag-conditional-submit/116326/1 "2007-10-04T14:33:56Z")

</div>

Hi,

Is there a way to allow conditional submission using the  
form\_remote\_tag. I am trying to prevent form submission if the input  
field in my form is empty.

Since, there is no support for onsubmit in form\_remote\_tag, I am  
looking for an alternative way to do that.

Returning ‘false’ from the :before=somefunc() doesn’t help either.

Any clues…

TIA  
~Shishir

---

<div class="post-metadata">

**Author:** ![shishir\_s](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f07891/32.png) [@shishir\_s](https://www.ruby-forum.com/u/shishir_s)\
**Post date:** [October 4, 2007, 2:45pm UTC](https://www.ruby-forum.com/t/form-remote-tag-conditional-submit/116326/2 "2007-10-04T14:45:40Z")

</div>

ok got it, :condition is available for form\_remote\_tag also…

thanks,  
shishir

On Oct 4, 5:32 pm, Shishir Srivastava [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
