Page 1 of 1
nuHasBeenSaved
Posted: Wed Jan 09, 2019 6:35 am
by marc
Happy new year to all nuBuilders!
I'm going to try this one again. It's very simple to reproduce.
Step 1: Add a new record to an edit screen,
Step 2: Refresh the form (CTRL+SHIFT+R)
nuHasBeenSaved() outputs 1 to the console instead of 0. This is not correct because the form has not yet been saved.
This is to be placed in the JavaScript of the form:
Code: Select all
if(nuFormType() == 'edit') {
console.log(nuHasBeenSaved());
};
I'd be really glad if the behavior could be corrected. I really don't like to go back to Google Forms.
Re: nuHasBeenSaved
Posted: Thu Jan 10, 2019 3:43 am
by admin
marc,
I have put a fix on Github for the nuHasBeenSaved() bug.
Steven
Re: nuHasBeenSaved
Posted: Sat Jan 12, 2019 9:26 am
by marc
Re: nuHasBeenSaved
Posted: Mon Jan 14, 2019 4:10 am
by admin
marc,
Sorry I meant to say the latest version of nuBuilder Forte can only be found on Sourceforge.
https://sourceforge.net/projects/nubuilder/
Steven
Re: nuHasBeenSaved
Posted: Tue Sep 22, 2020 6:06 am
by marc
Steven,
The bug is appearing again in the latest nubuilder. nuHasBeenSaved() returns 0 when the form is saved (it should return 1)
Re: nuHasBeenSaved
Posted: Wed Sep 23, 2020 8:20 am
by kev1n
Re: nuHasBeenSaved
Posted: Wed Oct 07, 2020 3:50 am
by kev1n
Steven,
In the latest version, when you add a new record and save it, nuHasBeenSaved() still returns the wrong result (0 instead of 1).
Please let me know if my fix works for you.
Re: nuHasBeenSaved
Posted: Wed Oct 28, 2020 9:06 pm
by Janusz
Hi,
Just tested the latest version of nuBuilder (Oct 22 23:58) and noticed the issue with nuHasBeenSaved();
It does not work for the first save on new record.
And just want confirm that the fix from Kev1n works OK.
Belowe short movie how to replicate the issue:
https://drive.google.com/file/d/1ypplI3 ... sp=sharing
and the fix
https://github.com/steven-copley/nubuil ... orm.js#L27
Code: Select all
To replace this line (nuform.js line 27)
if(window.nuLastForm != f.form_id || nuLastRecordId != f.record_id){
with
if(window.nuLastForm != f.form_id || (nuLastRecordId != f.record_id && nuLastRecordId !== "-1")) {
@Steven - is it possible to implement this fix with next release?
Re: nuHasBeenSaved
Posted: Thu Oct 29, 2020 4:37 am
by admin
Janusz,
Thanks.
I have added that to Github, please test it.
Steven
Re: nuHasBeenSaved
Posted: Thu Oct 29, 2020 7:45 pm
by Janusz
Steven,
The nuHasBeenSaved() from the latest update (Oct 29 04:26) tested and works fine.
Thanks a lot.