Required Fields for every Department
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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
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
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
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();
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();
-
- Information
-
Who is online
Users browsing this forum: No registered users and 6 guests