Customizing A Calendar Form
-
- Posts: 1
- Joined: Fri Aug 30, 2019
I am attempting to do two things.
1) I want to always set the "All Day" boolean (checkbox) to true.
2) I want to fill the Title field with the text value of a SharePoint lookup field (not a Cross Site Lookup control).
Should I do both of these things on the onsubmit handler? What would the code look like?
This is what I have:
1) I want to always set the "All Day" boolean (checkbox) to true.
2) I want to fill the Title field with the text value of a SharePoint lookup field (not a Cross Site Lookup control).
Should I do both of these things on the onsubmit handler? What would the code look like?
This is what I have:
Code: Select all
fd.field('OnCall').change(function(){
fd.field('Title').value(fd.field("OnCall").value());
});
fd.field('fAllDayEvent').value('1');
Hello MarionSmith,
Please use the below code to set Title with lookup text and 'All Day Event' to true on form load.
If you need to set fields value on form save, please use this code under onsubmit(handler).
You can find more details in 'Getting and setting SharePoint form field values' and 'Manager' articles.
Please use the below code to set Title with lookup text and 'All Day Event' to true on form load.
Code: Select all
fd.field('OnCall').change(function(){
fd.field('Title').value(fd.field('OnCall').control('getSelectedText'));
});
fd.field('fAllDayEvent').control()._el().find('input').attr('checked', true);
You can find more details in 'Getting and setting SharePoint form field values' and 'Manager' articles.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests