Skip to content

Modal HTML structure makes it kind of hard to use #2040

Discussion options

You must be logged in to vote

Some (untested) ideas

Tell the action buttons to submit an independent form

While the action buttons do not belong to a form inside the content node, you can of course tell them to submit the independent form when you click on them prior to close the modal

$('body').modal({
	actions: [{
		text: 'Submit',
		class: 'ok',
		click: function(){
			$('#myform').form('submit'); // FUI Form behavior OR
			$('#myform').submit(); // native form submit OR
			// submit the form inside the iframe
			var myIframeDoc = document.getElementById('myiframe').contentWindow.document;
			myIframeDoc.getElementsByTagName('form')[0].submit();
		}
	}]
});

Wrap the modals children into a form

This will make the mo…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@h0lg
Comment options

@lubber-de
Comment options

@h0lg
Comment options

@lubber-de
Comment options

Answer selected by lubber-de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment