# Prompt

**URL:** <https://www.ruby-forum.com/t/prompt/110762>\
**Category:** Rails\
**Created:** [July 30, 2007, 6:23pm UTC](https://www.ruby-forum.com/t/prompt/110762 "2007-07-30T18:23:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [July 30, 2007, 6:23pm UTC](https://www.ruby-forum.com/t/prompt/110762/1 "2007-07-30T18:23:17Z")

</div>

I would like to add a prompt to a membership validation method that I  
have which basically validates a number that the user enters. If the  
number is validated, their info is saved to a database, but if not, a  
prompt pops up saying “Invalid Membership Number,” or something to that  
effect. The thing is I have no idea how to do this. I know that in a  
link\_to helper I can say :confirm =\> “Really?”. The rub here is, that I  
need this box to only popup if a condition fails and defently not  
everytime a button (in this case I am using a form and a bitton) is  
clicked. Is there anyway I can get this type of action from my  
controller? Thanks in advance,

~S
