Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing values from form1 to form2

Status
Not open for further replies.

duntinq

Programmer
Feb 23, 2006
6
US
Hi all, is it possible to prefill a form (form2) with values (inputed by user) in form1 if we have no control overl form2 ?
 
I'm not sure I understand what you're asking?

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
I think that would depend on what Form2 has set up on either server side programming, or Javascript. If you don't have access to change the form though, you'll need to go to the group/company that does to find out if they support that type of action.

- George
 
simple_form.html
Code:
<html>
<body>
<form action="/cgi-bin/passItOn.pl">
<input type='text' name='pass_this' />
<input type='submit' />
</form>
</body>

Simple CGI to build the second form, using content from the first.
Code:
#!perl

use CGI;

my $cgi_object = new CGI;
my $passed_var = $cgi_object->param('pass_this');

print $cgi_object->header,
	$cgi_object->start_html,
	$cgi_object->start_form,
	qq(<input type='text' name='new_text_box' value="$passed_var" />
		<input type="submit" />);
	$cgi_object->end_form,
	$cgi_object->end_html;

'hope this helps

If you are new to Tek-Tips, please use descriptive titles, check the FAQs, and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top