CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 {Resolved} Add non-user inputted text to a field on insert

Print topic Send  topic

Author Message
ckroon

Posts: 869
Posted: 07/16/2008, 7:24 PM

Hi all.. I swear I knew how to do this at some point.. but have since forgotten.

i have a form where a user is entering data in a listbox and in a text area.

what I want to do is to append both those entries with a word or two.

For example: If user selects a reason from a Listbox I want to append "Reason:" in front of it as it is saved to the table.

Kindly point me in the right direction.
thanks!

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message
DonP
Posted: 07/16/2008, 10:29 PM

It's probably something like this in the Before Insert:

$RecordName->$FieldName->SetValue("Reason: " .
$RecordName->$FieldName->GetValue());

Personally I would prefer not to add the word over and over to the
record itself but rather to append in on the fly to wherever it is you
are showing or viewing it again. In fact, if there is finite number of
"reasons", I would prefer them to be in their own lookup table with the
value being inserted only the numeric ID for each. My two cents' worth!

Don (DonP)

ckroon wrote:
> Hi all.. I swear I knew how to do this at some point.. but have since
> forgotten.
>
> i have a form where a user is entering data in a listbox and in a text area.
>
> what I want to do is to append both those entries with a word or two.
>
> For example: If user selects a reason from a Listbox I want to append "Reason:"
> in front of it as it is saved to the table.
>
> Kindly point me in the right direction.
> thanks!
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.yessoftware.com/
>
ckroon

Posts: 869
Posted: 07/17/2008, 12:13 AM

Thanks Don!
I agree with you about the procedure.. but i sort of designed myself into a corner and don't have time to revamp the component.. but I will get to it later.. this is just a quick fix.

_________________
Walter Kempees...you are dearly missed.
View profile  Send private message

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.