Re: Populate input from another form

From: Date: Sat, 09 Mar 2013 03:18:05 +0000
Subject: Re: Populate input from another form
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-320440@lists.php.net to get a copy of this message
On 3/8/2013 3:43 PM, John Taylor-Johnston wrote:
Scratch that, IE does not like form elements outside the </form>!!?? :,( I can't a form within a form either, unless ... I float a div??. John Taylor-Johnston wrote:
I have a form <form action="CRTP_Query.php" id="CRTP_Query" method="post" target="_CRTP"><input value="Query" form="CRTP_Query" type="submit"></form> OnSubmit, I want to include data from another form (form="DPRform"). <input name="DPRsurname" type="text" form="DPRform" size="20" value="<?php echo stripslashes($_POST["DPRsurname"]);?>"> I should use a hidden identical field and use form="CRTP_Query": <input name="DPRsurname" type="hidden" form="CRTP_Query" value="<?php echo stripslashes($_POST["DPRsurname"]);?>"> But I have no idea how to populate the hidden field with the data from the viewable field. PHP cannot do this onsubmit, can it? Anyone have an example to show me please? Do I need to use jquery?
no.


« previous php.general (#320440) next »