Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
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 4665 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();
   }
}

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]