Welcome, Guest ( Customer Panel | Login )




 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-CART 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

4679 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-CART 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
0 Item(s)
$0.00