Script to get the value of the select box

Naresh291
Tera Contributor

Hi ,

I have a select box called  'unit of measurement' which has several values in it . My requirement is  , if the 'unit of measurement' field has value 'centimeter' which has the numeric value of '30'   , then it would perform some actions .

I am not able to get the value for 'unit of measurment' when i am using g_form.getValue('unit_of_measurement');

it shows me some undefined value .

Can anyone tell me what is the correct function i should be using to fetch the value.

 

Thanks

8 REPLIES 8

Dhananjay Pawar
Kilo Sage

Hi Naresh,

May I know which operation you want to perform? Can you elaborate requirement in details so people will help you.

Thanks,

Dhananjay.

Naresh291
Tera Contributor

Will this work for catalog client script?

 

Hi Which actions it should perform after satisfying the conditions?

Thanks,

Dhananjay.

manjusha
Kilo Guru

Hi,

can u please check database name of your measurement field.

i think because of that u are not getting correct value.

just by rignt clicking on the field get database name of the field.

use g_form.getValue('database_field_name');

check this above line in onchange script .

write onchange script on measurement fuekd.

If this solution helps then mark it as correct and helpful .

 

Thanks,

Manjusha