Page 1 of 1

JavaScript SPForm load prompts an error

Posted: 25 May 2018
by ching29
Hi,

I am encountering an error when trying to check if form already loads. I've tried using this code
fd.rendered(function() {}
and
fd.spRendered(function() {}
but both shows an error. Please see attached images.

This is my simple JavaScript code.
fd.spRendered(function() {
if(fd.field('AssignBy').value() == 'Individual'){
$('.individualHide').hide();
$('.departmentHide').show();
}
else if(fd.field('AssignBy').value() == 'Department'){
$('.departmentHide').hide();
$('.individualHide').show();
}
else if(fd.field('AssignBy').value() == 'Position Hierarchy'){
$('.departmentHide').hide();
$('.individualHide').hide();
}
}
);
Thank you,
Ching

Re: JavaScript SPForm load prompts an error

Posted: 25 May 2018
by Nikita Kurguzov
Dear Ching,
These events are from our Forms product, they are not supported in Forms Designer (and not necessary, due to differences in architecture). For information about Forms Designer's code, check out these pages:
1) JS Manages for FD - https://spform.com/documentation/js/manager
2) JS Field methods for FD - https://spform.com/documentation/js/field
3) Getting and setting various FD fields with JS - https://spform.com/javascript-framework ... eld-values

Re: JavaScript SPForm load prompts an error

Posted: 29 May 2018
by ching29
This is noted. Thank you.

Reagrds,
Ching