http://forums.nubuilder.cloud/viewtopic.p ... 0d5#p12970
The reason for this is some validation in the JS section with nuBeforeSave and that the subform rows are read-only as default.
On the JS main form:
Code: Select all
//edit button on subform
function openChild(t){
var rw = $('#' + t.id).attr('data-prefix') //-- current row in subform
var id = rw + '_nuPrimaryKey'; //-- Primary Key for record in subform
var fpk = '5361ec013b6ca4f'; //-- Form Primary Key
var rpk = $('#' + id).val(); //-- Record Primary Key
nuOpenFormInFrame(fpk,rpk); //--open form in floating window
}
Code: Select all
openChild;
Code: Select all
$js = "
function detect(){
if (nuFORM.edited){
nuSetHash('chg','1');
var det = 1
return det;
}
}
nuRemoveModal(); //--close frame
";
nuAddJavascript($js);
This part works.
Now I want to reload the main form, when the subform record was changed to show the changes in the subform.
Essentially what the reload button in the lower right corner does, but without omitting any other changes by the user on the main form!
I played around with functions and nuSetHash in AfterSave of the subform, and in the Javascript of the main form, but it doesn't work.
How can I achieve this? Essentially the same functionality like if the "Add record" button was clicked on a lookup and the values are sent back to the lookup and then to the main form.
Tinka