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.
#826456
Yep, I tried read only, and for view only, it works fine, except since I embedded a control into a subform, and that control is depended on another control that uses an event listener, it doesn't work as documented in viewtopic.php?t=710350

I just did a work around by making it view only and having the event listener in the parent form's JavaScript.

By the way, just incase, I still had the same problem with the disabled checkgroup clearing out even when it's not in a subform.
amosbatto wrote: Tue Sep 10, 2019 4:07 pm I'm not seeing the problem in PM 3.2.0 Community (manual install in Debian 9.5).

Have you tried "read-only" mode?
Is your list of options in the checkgroup populated with an SQL query?
#826547
Yep, I tried read only, and for view only, it works fine, except since I embedded a control into a subform, and that control is depended on another control that uses an event listener, it doesn't work as documented in viewtopic.php?t=710350

I just did a work around by making it view only and having the event listener in the parent my ip birthday wishes tneb form's JavaScript.
By the way, just incase, I still had the same problem with the disabled checkgroup clearing out even when it's not in a subform.
Last edited by greenhouse on Thu Sep 19, 2019 3:12 pm, edited 1 time in total.
#826550
Are you sure that you only have one case open at a time in your web browser?
If you open a second case in the same web browser, you change the system variables, so variables won't be correctly saved when submitting a Dynaform.

If you want me to check out what is happening, you can post the .pmx file for your process, but tell me exactly which Dynaform has the problem and in which task.
#826569
I created a new process to make it easier to look at. I narrowed it down to the javascript for a button control that's causing it. A submit control works fine, but if you use the following JavaScript, by the 3rd task the selections disappeared.
Code: Select all
$("#button0000000001").find("button").click(function()
{ 
	$("form").submitForm();
});
See the attached file.
amosbatto wrote: Tue Sep 17, 2019 6:04 pm Are you sure that you only have one case open at a time in your web browser?
If you open a second case in the same web browser, you change the system variables, so variables won't be correctly saved when submitting a Dynaform.

If you want me to check out what is happening, you can post the .pmx file for your process, but tell me exactly which Dynaform has the problem and in which task.
Attachments
(46.94 KiB) Downloaded 3 times
#826572
Make sure that you are using that code in a normal button (not a submit button).
Also, try using this code:
Code: Select all
$("#button0000000001").find("button").click(function() {
   var formId = $("form").prop("id");
   $("#"+formId).submitForm();
});
Does that change anything?
#826585
Correct, the code is only for the normal button control, not the submit button control.
It still has the same effect even after the change. I've also attached the updated pmx with the change your requested.
amosbatto wrote: Wed Sep 18, 2019 5:50 pm Make sure that you are using that code in a normal button (not a submit button).
Also, try using this code:
Code: Select all
$("#button0000000001").find("button").click(function() {
   var formId = $("form").prop("id");
   $("#"+formId).submitForm();
});
Does that change anything?
Attachments
(47.08 KiB) Downloaded 3 times
#826588
I just ran a case in your process, and I didn't observe the values in the checkgroup being deleted.
I clicked on the button (not the submit button) each time, and the values were were always saved.

I just tried it in 3.3.10 community Edition (in Debian 9.5, PHP 5.6.37, MySQL 5.7.17).
You need to upgrade, but see this before upgrading:
https://www.pmusers.com/index.php/Bugs_ ... /upgrading
Build Cache issue

Hi. I am having an issue that is replicated in a […]

mandatory input document

I want to display alert message using javascript, […]

Change template of reset password

Anyone can help me, Please!

There is no way currently to migrate from version […]