Page 1 of 1
Required Fields for every Department
Posted: 28 Sep 2016
by TWendt
Hi all,
i have six departments. For every department i have a choice field Approved / Not approved, a date field and a people picker field. If the choice field is marked, the other fields should be required. What must i do?
Best wishes
Tom
Re: Required Fields for every Department
Posted: 28 Sep 2016
by Dmitry Kozlov
Re: Required Fields for every Department
Posted: 30 Sep 2016
by TWendt
Hi Dmitry,
thanks for the information. But can you give me more information about a choice field with radio buttons 'PME_x002d_Freigabe'?
function setRequiredFields() { if (fd.field('PME_x002d_Freigabe').value().dictionaryEntries.length != 0) { // Add asterisks fd.field('PME_x002d_Datum').titleRequired(true); } else { // Remove asterisks fd.field('PME_x002d_Datum').titleRequired(false); } } Unfortunately it does not work. Best regards Tom
Re: Required Fields for every Department
Posted: 02 Oct 2016
by YuriyMedvedev
Hi!
For radio-buttons you have to use just "value()", like in this example. Here, if first radio is choosen "Name"-field is not required, but if you chose other radio - it is required.
function setRequiredFields() {
if (fd.field('Radio').value() != 0) {
fd.field('Name').titleRequired(true); }
else {
fd.field('Name').titleRequired(false); } }
fd.field('Radio').change(function(){
setRequiredFields();
});
setRequiredFields();