rkiss
Posts: 14
|
| Posted: 11/19/2004, 10:30 AM |
|
Hi,
I was wondering if anyone knows how to hide/display text field on conditional event.
lets say that I have a form where I want the end user to fill out some information. If he/she selects a value from the drop down menu field called - "other" a new (currently hidden text field) will appear under the drop down menu field.
Any ideas/help is appreciated.
Thanks
R
|
 |
 |
Bensky
|
| Posted: 11/22/2004, 10:48 AM |
|
I would like to know this as well.
Thanks
B
|
|
|
 |
Martin K
|
| Posted: 11/22/2004, 11:46 AM |
|
Hello.
Sorry about my english.
You can make this with a Lable Field.
The Name of your Form I call was $NewRecord1.
The Name of your currently hidden text field I call was text2.
Make a new Label Field under the Listbox where you will select other = 1. I call it Label1. Set it to HTML. Insert in Before Show of the Label1:
if(CCGetFromGet("other", 0) == 1)
$texarea = "<textarea style=\"WIDTH: 443px; HEIGHT: 97px\" name=\"NewTextarea\">" . $NewRecord1->text2->GetValue() . "</textarea>";
elseif(CCGetFromGet("other", 0) <> 1)
$texarea = "";
$NewRecord1->Label1->SetValue($texarea);
Then in Before Insert of the Form:
if(CCGetParam("NewTextarea", "") <> "")
$NewRecord1->text2->SetValue(CCGetParam("NewTextarea", ""));
and in Before Update of the Form:
if(CCGetParam("NewTextarea", "") <> "")
$NewRecord1->text2->SetValue(CCGetParam("NewTextarea", ""));
YourSide.php?other=1
will show the new TextArea.
if other <> 1 there is no TextArea
Greets from Germany
martin
|
|
|
 |
Roman
|
| Posted: 11/24/2004, 5:32 AM |
|
martin,
thank you
R
|
|
|
 |
|