Page 1 of 1

Close child modal on INSERT

Posted: 2020-04-06 22:14
by jmcgov
Hi,
When I add a new child record using the child modal from a parent record, I want
- the modal to close when the child record is inserted (I thik I use this "AppGini.closeParentModal()" from release 5.7", but how?)
- the s2 option box to be pre-populated with the new value
Any assistance, please?
James

Re: Close child modal on INSERT

Posted: 2020-04-08 21:25
by jmcgov
Progress
- enter the code below in the tablename-dv.js hook file, bingo!
- any thoughts on the second part, folks?

Code: Select all

$j(function(){
	if($j('input[name=Embedded]').val()==1){
		$j('form').submit(function(){
			//window.parent.jQuery('.modal').modal('hide');
			AppGini.closeParentModal(); 
		})
	}
})