Related-items Get Column Id
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Sertkaya,
1) To empty value of several text fields inside one table, first give this Table a CSS class like my-table, then use the following code:
2) If you try to get the ID, try the following code:
If not ID, but another field, just replace ID with the Internal name of the field. If you have more than one Related Items control, replace 0 in relatedItems() with the number of the correct Related Items control.
1) To empty value of several text fields inside one table, first give this Table a CSS class like my-table, then use the following code:
Code: Select all
$('.my-table').find('.fd_field input').each(function(){
this.value = '';
});
Code: Select all
fd.relatedItems(0).data('ctx').ListData.Row[0].ID;
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Sertkaya,
No, unfortunately it's not possible to make field mandatory with JavaScript. What you can do is use JavaScript validation instead of default SharePoint validation. Read more about it here - https://spform.com/javascript-framework ... ynamically
No, unfortunately it's not possible to make field mandatory with JavaScript. What you can do is use JavaScript validation instead of default SharePoint validation. Read more about it here - https://spform.com/javascript-framework ... ynamically
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Sertkaya,
What type of field are you trying to get?
What type of field are you trying to get?
Cheers
- Nikita Kurguzov
- Posts: 889
- Joined: Mon Jul 03, 2017
Dear Sertkaya,
Try the following code for Lookup instead:
Try the following code for Lookup instead:
Code: Select all
fd.relatedItems(0).data('ctx').ListData.Row[0].FIELD_NAME[0].lookupValue;
Cheers
Hi again,
My code is not working. CSS name of my table is 'Kaza'
My code is not working. CSS name of my table is 'Kaza'
Code: Select all
$('.Kaza').find('.fd_field input').each(function(){
this.value = '';
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 26 guests