Form with field, changed to titleRequired field Save with blank required field?

Discussions about Forms Designer for SharePoint 2010.
Locked
User avatar
Дмитрий Фоломеев
Posts: 13
Joined: Tue Nov 25, 2014

28 Nov 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).

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

01 Dec 2014

Hi Dmitry,

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;
});

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests