VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 Add default value to Pother4 field
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bwalz
VP-ASP New User

USA
82 Posts

Posted - January 21 2009 :  15:53:24  Show Profile  Visit bwalz's Homepage  Reply with Quote
I want to add a default value to the form field Pother4 in shopa_addproduct.asp. I want to be able to change that value if needed when adding/updating products but most the time it will be the default value.

Is this possible and if so how can that be achieved?

=== here's where the field is being created ====
PCreateRow getlang("LangProductOther4"),"strPother4",strPother4

Thanks ahead of time!

support
Administrator

4266 Posts

Posted - January 21 2009 :  16:22:52  Show Profile  Visit support's Homepage  Reply with Quote
Hi,

You should just be able to check if strPother4 has a value assigned to it already and if not, then assign your default value.

You would likely need to modify the code where the field is created to something like:

If strpother4 = "" Then
strpother4 = "default text"
End If

PCreateRow getlang("LangProductOther4"),"strPother4",strPother4


That should assign a default value to the field in the case that there is no value previously assigned.

Regards
Michael
VPASP SUPPORT
Go to Top of Page

bwalz
VP-ASP New User

USA
82 Posts

Posted - January 21 2009 :  17:36:10  Show Profile  Visit bwalz's Homepage  Reply with Quote
Thanks a bunch. That's what I needed
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000