CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 how to change field type

Print topic Send  topic

Author Message
Helder Meneses
Posted: 01/18/2002, 12:43 AM

hi there, first of all thank you for your help, i can make things much faster, than if i would program manually...another thing...

when i insert a record, i would like to when in the future i edit that record change the type of a field....like when i insert the name, age, and email, when i edit the field email is label, and before was text box...


thank you...i would appreciate your help...

helder meneses
helder.meneses@oninet.pt
Nicole
Posted: 01/18/2002, 1:35 AM

Helder,
the solution requires some manual coding. First of all if you want to display e.g. email field in different types you should set its type to Label and select 'HTML' checkbox on its properties.

(BTW, some explanation... CodeCharge Record form could be in two modes:
1. insert mode. You see Insert and Cancel buttons on the form. The form is ready to insert new record into table. No primary key value is passed to the form.
2. update mode. You pass primary key value of particular record to the form and you see fields on the Records form filled with the values of table fields of particular record. Now can edit only this record and you see Update, Delete and Cancel buttons on the form.
To set form in update mode you should pass primary key to it. Primary key field is storeed in pPKprimary_key_field_name variable, e.g. pPKmember_id)

Create BeforeShow event where check the value of pPKprimary_key_field_name. If it is empty email field should be textbox. Here is sample code how to do it:
ASP
if pPKprimary_key_field_name = "" then
fldemail = "<input type=""text"" name=""email"" maxlength=""50"" value="& fldemail &" size=""50"">"
end if

PHP
if ($pPKprimary_key_field_name == "")
$fldemail = "<input type=\"text\" name=="email\" maxlength=\"50\" value=". $fldemail ." size=\"50\">";

Then create CustomAction event to add email field to generated sql.

   


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

Web Database

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.