• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 257
  • Last Modified:

form name value not carrying over.

I have a multi-page form that is passing form input from one to the other.  Form 1 must have decimals as part of a javascript calculation for the name but I am noticing that the values are not carrying over to the detination page.  When I remove the decimal it works.  Unfortunately, I have to have them in there.  How do I work around this?  here is an example of the problem.

Form 1:  <select name="test1.00"><option value="3">test</option></select>

Form 2:  <input type="text" name="test1.00" value="<?php echo((isset($_POST["test1.00"]))?$_POST["test1.00"]:"") ?>" />

Form 2 text field is blank.

Thanks in advance!
0
pda4me
Asked:
pda4me
1 Solution
 
ljubiccicaCommented:
I don't know why, but php changes name to test1_00

So you need to change your Form 2 to:

<input type="text" name="test1.00" value="<?php echo((isset($_POST["test1_00"]))?$_POST["test1_00"]:"") ?>" />

Greets
Ljubiccica
0
 
HackneyCabCommented:
I don't think that the period is a valid character in a form field identifier.

Could you change the decimal point to a hyphen, so you have test1-00, and then use Javascript to modify that into a decimalised value for your calculation?
0
 
pda4meAuthor Commented:
Thanks ljubiccica, that worked like a charm!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now