Button to hide/show something on a form

Hey,I have simpletable on a user form that I want to show if the user pushes a button. I can get this to work with a checkbox field. But not a button.Any one any ideas?
[189 byte] By [s6craig] at [2007-11-26 8:39:27]
# 1
try with a Action Chekc box clicked next to your field name and put some condition on disable option.
walkin_java at 2007-7-6 22:14:44 > top of Java-index,Web & Directory Servers,Directory Servers...
# 2
Do you mean use a check box to hide and show the table? If so I already have that working. I would prefer it if the user could click a button to hide and show stuff as I think it looks better.
s6craig at 2007-7-6 22:14:44 > top of Java-index,Web & Directory Servers,Directory Servers...
# 3

Try the following:

<Field name='yourButton'>

<Display class='Button'>

<Property name='label' value='Surprise'/>

<Property name='command' value='Recalculate'/>

<Property name='value' value='true'/>

<Property name='Help' value='<b>Click this to reveal a new widget.'/>

</Display>

</Field>

<Field name='theHiddenWidget'>

<Display class='Text'>

<Property name='title' value='Your Surprise'/>

<Property name='size' value='15'/>

<Property name='maxLength' value='10'/>

</Display>

<Disable>

<isFalse>

<ref>yourButton</ref>

</isFalse>

</Disable>

</Field>

In my testing, theHiddenWidget remains revealed through subsequent recalculations, but I recommend you test it yourself through all the Expansion changes your form will execute.

If you want to hide it again, you'll need a more complicated Disable condition and probably a third field which acts as a toggle when the button it pressed.

Jason

jsallee at 2007-7-6 22:14:44 > top of Java-index,Web & Directory Servers,Directory Servers...
# 4
Thanks Jason, that worked perfectly.
s6craig at 2007-7-6 22:14:44 > top of Java-index,Web & Directory Servers,Directory Servers...
# 5
helloall , I have a question, how can I set back the value to false after the buton have been pressed, because after pressed the first time the value 'true' remains forever; I've tried to change the value but it doesn't work.thanks
dieraven2003 at 2007-7-6 22:14:44 > top of Java-index,Web & Directory Servers,Directory Servers...