Page 1 of 1

Setting a Field Value

Posted: 19 Feb 2014
by schuess
I am attempting to set a fields value and am having issues. My test alert is returning undefined.



fd.field('reqFormSub').change(function() {

if (fd.field('reqFormSub').control().value() == 'No'){

$('.mycontractLang').css("Display","inline"); //this is a seperate text line and this is working

//below are all my attempts to set the value of a simple text input!

//fd.field('contractLang').control()._el().find('input').val("If NO, Please review contract language with RM.");

//fd.field('contractLang').control().value() = "If NO, Please review contract language with RM.";

//fd.field('contractLang').attr('value', "If NO, Please review contract language with RM.");

//fd.field('contractLang').control().value('If NO, Please review contract language with RM.');

//fd.field('contractLang').control().val('If NO, Please review contract language with RM.');

alert(fd.field('contractLang').control()._el().find('input').val());

alert(fd.field('contractLang').control().value());

} else{

$('.mycontractLang').css("Display","none");

//fd.field('contractLang').control()._el().find('input').val("");

};

});



I have reviewed the following posts:

http://formsdesigner.blogspot.com/2013/ ... -form.html

http://spform.com/documentation/js/field

Re: Setting a Field Value

Posted: 20 Feb 2014
by Dmitry Kozlov
Hi Matt,

Could you send HTML-source of your form page to support@spform.com?