CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 conditional display of text field

Print topic Send  topic

Author Message
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
View profile  Send private message
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

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.