[ originally posted in http://www.gossamer-threads.com/lists/wiki/wikitech/454703 ]
Creating two HTMLForms in single Special page with code:
public function execute($par) { $this->setHeaders(); $array1 = $this->getAnnounceFormFields(); $array2 = $this->getCreateFormFields(); $htmlFormNewIssue = new HTMLForm( $array1, $this->getContext() ); $htmlFormNewIssue->setSubmitText( 'Create a new Issue' ); $htmlFormNewIssue->setSubmitCallback( array( 'SpecialNewsLetterPublishers', 'onSubmitNewIssue') ); $htmlFormNewIssue->show(); $htmlFormNewNewsLetter = new HTMLForm( $array2, $this->getContext() ); $htmlFormNewNewsLetter->setSubmitText( 'Create a new Newsletter'); $htmlFormNewNewsLetter->setSubmitCallback( array( 'SpecialNewsLetterPublishers', 'onSubmitNewsLetter') ); $htmlFormNewNewsLetter->show(); }
Shows up the multiple forms, but clicking 'Submit' on one form submits both 'Forms'. ie it is not possible to submit only one form. The complete code is over here : https://phabricator.wikimedia.org/P770