Zen Cart Logo

Mandatory Text Attribute

Locked

Views: 1,394

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
26 Jan 2007, 2:27 PM
#1
jsweb avatar

jsweb

Zen Follower

Join Date:
Jul 2005
Location:
UK and Ireland
Posts:
392
Plugin Contributions:
0

Mandatory Text Attribute

Hi Zenners,

Standard Zen Vs Javascript needed - seeking a solution to ensure that a Text Message attribute is entered mandatory by cients when they click ADD TO CART

e.g.

Enter your personal message here (Max 120 characters)...
Message [_________________________]

JavaScript we almost have working:

===============
function checkMsg(thisForm) {
var formName = thisForm.id;
var elmt = document.getElementById(formName);
var elmntVal = elmt.id[txt_5].value;
if (elmntVal == "") {
var agree=confirm("You have not entered a personal message!!\nAre you sure you wish to continue?");
if (agree) return true;
else return false;
}
else return true;
}

Any JavaScript Gurus offering help?

Thanks

27 Jan 2007, 5:28 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Mandatory Text Attribute

Did you try to just click on the setting for:

Attribute Required
for Text:
No Yes

This is able to be set on a Per Product Per Attribute basis ... :smile:

31 Jan 2007, 4:22 PM
#3
jsweb avatar

jsweb

Zen Follower

Join Date:
Jul 2005
Location:
UK and Ireland
Posts:
392
Plugin Contributions:
0

Re: Mandatory Text Attribute

Thanks Linda,

Missed that in Attributes... Attributes Controller > Product > Required = ON