JavaScript SPForm load prompts an error

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
ching29
Posts: 15
Joined: Thu Mar 13, 2014

25 May 2018

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
Attachments
spRendered.PNG
spRendered error
spRendered.PNG (4.27 KiB) Viewed 2019 times
rendered.PNG
rendered error
rendered.PNG (3.37 KiB) Viewed 2019 times

User avatar
Nikita Kurguzov
Posts: 889
Joined: Mon Jul 03, 2017

25 May 2018

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
Cheers

ching29
Posts: 15
Joined: Thu Mar 13, 2014

29 May 2018

This is noted. Thank you.

Reagrds,
Ching

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests