Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By manalidhuri
#826563
Capture.PNG
Capture.PNG (2.32 KiB) Viewed 920 times
I have use this javascript code to add mandatory sign to the checkbox
Code: Select all
if(foreigncurrency=='14')
   {     
   	var h = '<span id="star" style="color:red">*</span>';
    $("#gglchek").find("label").append(h);
   }
  
   else
   {
      var h = '<span id="star" style="color:white">*</span>';
      $("#gglchek").find("#star").remove();
   }
but it will add two * signs as shown in screenshot and i have to remove one * which are mention using arrow.
Is there any way to resolve this issue?
Please help!

Thanks
#826576
To remove the other red asterisk in the field's label, you can use control.disableValidation() and
control.enableValidation().

If you don't want to change the required property and just want to remove the red asterisk, then you can hide it like this:
$("#fieldID").find("span.pmdynaform-field-required").hide()
and show it:
$("#fieldID").find("span.pmdynaform-field-required").show()
#826640
If you just want to add/remove a red asterisk in the field's label, then do it this way:
Code: Select all
if (foreigncurrency=='14')
   {     
     var h = '<span id="star" style="color:red">*</span>';
     $("#gglchek").find("span.textlabel").append(h);
   }
   else
   {
      var h = '<span id="star" style="color:white">*</span>';
      $("#gglchek").find("#star").remove();
   }
}
end process using trigger

How to end process using trigger? There are two fi[…]

Hi, Have you execute the timereventcron.php scri[…]

Hi, Please test it with a new process and English […]

hola, quisiera su ayuda. tengo la siguiente estr[…]