Hello,
When I update the value of a field (fiedl02) from an event (onchange) of another field (field01), the value is displayed but is not stored in the database when the we submit the form.
Example :
Field01 field:
onchange: $ ('# field02'). val ('TEST' ');
Field02 field:
Display the value "TEST" correctly
Activation of the [Save] button
Result :
The value "TEST" is not stored in the table.
Thank you for your help.
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Value not saved
Re: Value not saved
ltrannoy,
When did you find this happen?
When did you last update from Github?
Steven
When did you find this happen?
When did you last update from Github?
Steven
-
- Posts: 19
- Joined: Sat Jul 26, 2014 10:09 am
- Location: France
-
- Posts: 11
- Joined: Wed Jan 17, 2018 7:06 pm
Re: Value not saved
Hi ltrannoy,
not really a solution but try to add the following code:
I have the same issue with my datetime field https://forums.nubuilder.cloud/viewtopic.php?f=19&t=9255 however for some reason it works if I call the nuBeforeSave function.
not really a solution but try to add the following code:
Code: Select all
function nuBeforeSave(){
return true;
}
Re: Value not saved
pyro,
I believe your problem was different, I've answered it here.. http://forums.nubuilder.cloud/viewtopic.php?f=19&t=9255
Steven
I believe your problem was different, I've answered it here.. http://forums.nubuilder.cloud/viewtopic.php?f=19&t=9255
Steven
Re: Value not saved
ltrannoy,
I just wanted to know if it had anything to do with any changes I have made today.
Your question is a good one.
Your problem is that once you have updated a field with code, you need to run change() on the updated Object.
This lets nuBuilder know that this Object has been edited so that it will be saved.
(Only edited Objects are saved by nuBuilder)
Steven
I just wanted to know if it had anything to do with any changes I have made today.
Your question is a good one.
Your problem is that once you have updated a field with code, you need to run change() on the updated Object.
Code: Select all
$('# field02').val('TEST').change();
(Only edited Objects are saved by nuBuilder)
Steven
-
- Posts: 19
- Joined: Sat Jul 26, 2014 10:09 am
- Location: France