Form with field, changed to titleRequired field Save with blank required field?
- Дмитрий Фоломеев
- Posts: 13
- Joined: Tue Nov 25, 2014
I use a function (titleRequired) to set field value requirement on the condition through javascript.
When the condition is true, and SharePoint header of field appears red * (e. m. title required).
Further, i leave the field (with title required) blank and click "Save" button on SharePoint form it save with no error.
Form with field, changed to titleRequired field Save with blank required field. The documentation also says that the only change the asterisk. How to make a filling fields (changed to titleRequired field) are required to save the form?
fd.field('_x041a__x043e__x043c__x043c__x04').titleRequired(true); //javascript code I use
..In addition. If the field was originally titleRequired sharepoint field and it change with javascript to titleRequired (When the condition is true), form is not saved, error output (the field is required).
When the condition is true, and SharePoint header of field appears red * (e. m. title required).
Further, i leave the field (with title required) blank and click "Save" button on SharePoint form it save with no error.
Form with field, changed to titleRequired field Save with blank required field. The documentation also says that the only change the asterisk. How to make a filling fields (changed to titleRequired field) are required to save the form?
fd.field('_x041a__x043e__x043c__x043c__x04').titleRequired(true); //javascript code I use
..In addition. If the field was originally titleRequired sharepoint field and it change with javascript to titleRequired (When the condition is true), form is not saved, error output (the field is required).
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
Hi Dmitry,
You should validate the field via JavaScript in onsubmit handler:
You should validate the field via JavaScript in onsubmit handler:
Code: Select all
fd.onsubmit(function() {
if (!fd.field('FieldName').value()) {
alert('Please, fill-in the Field.');
return false;
}
return true;
});
-
- Information
-
Who is online
Users browsing this forum: No registered users and 15 guests