Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
By laraujo
#6239
Hello,

I have a javascript that modifies the label on a button through this instruction:

getField('cancel').value = "Cancel";
getField('submit').value = "Continue";

However, recently I modified the dynaform's html (heavily) and this function stopped working.

Does anyone know what might be the problem?

Thanks in advance!
#6262
I would ensure the HTML still contains "id" attributes for the buttons in question, and that they match 'cancel' and 'submit'.

If they do, you may also want to try:

document.getElementById('cancel').value = 'blah';

I don't know if getField() is an alias for that or if it does something more complex, so I figured I would offer that up.
#6263
I don't know if getField() is an alias for that or if it does something more complex, so I figured I would offer that up.
All the fields in DynaForms have the name and id of "form[field-name]". What getField() does is simply convert:
getField("field-name")
to:
document.getElementById("form[field-name]")
#6304
Another thing, is that you might want to stick this in your javascript code:
alert(var_dump(getField("button-name");

Then look through the list of the properties for the button and make sure that the id and name are the same.

Temu New user DIscount code Using Temu's DIscount […]

By using the Temu coupon code [acu600079], you can[…]

Yes, the Temu Coupon Code "aci384098" or[…]

Yes, the Temu Coupon Code "aci384098" do[…]