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 HeshanKaru1994
#825942
Imagine you have 5 different subforms and you need to clear them depending on the scenario

If process A is selected only 1 subform need to be cleared.
If process B is selected all the subforms need to be cleared.
User avatar
By avanzyl
#825948
Hi HeshanKaru1994,

Have you tried using the following javascript in the dynaform?

For example, to reset all fields in a Dynaform to their original values:
$("form")[0].reset()
User avatar
By amosbatto
#825959
Similar to what avanzyl recommends, you can use this code to reset the subform to its orginal values with this JavaScript:
$("#1234567890abcdef1234567890abcdef")[0].reset();
Where 1234567890abcdef1234567890abcdef is the ID of the subform.

Another way is to use this code:
$("#1234567890abcdef1234567890abcdef").find("input, textarea, select").val("");
User avatar
By avanzyl
#825976
Just make sure that you do in fact have the function written correctly. It looks like you dont have "()" at the end of reset like this:

....reset()
User avatar
By avanzyl
#825980
You get the same error using this?

$("#1234567890abcdef1234567890abcdef").find("input, textarea, select").val("");

Where 1234567890abcdef1234567890abcdef is the subform ID

Sending documents as base64 worked the last time I[…]

I don't see those problems using PM 3.3.10 Communi[…]

Tengo el mismo problema con el MultipleFile, inten[…]

Getting this error

_ERROR_ : The row '3149943815d31b85fdf39650326697[…]