Closed (fixed)
Project:
SimpleTest
Version:
6.x-2.10
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Aug 2010 at 07:33 UTC
Updated:
18 Aug 2010 at 07:40 UTC
I have a form that uses password_confirm but I can't get the form to accept any values successfully. The password_confirm converts the single field "pass" to two password fields "pass1" and "pass2"
If I use $edit['pass'], Simpletest says there's no such field; if I use $edit['pass1'] and $edit['pass2'] it says they don't exist; if I use $edit['pass'] = array('pass1' => 'xxxxxxx', 'pass2' => 'xxxxxxx') it says "pass" must be a string.
How do I get around this?
Comments
Comment #1
dave reidYou have to look at the HTML of the form and get the value in the 'name' property of the input field. In this case it is "pass[pass1]" and "pass[pass2]".
Comment #2
adaddinsaneI tried $edit['pass'] = array('pass1' => 'xxxxxxx', 'pass2' => 'xxxxxxx') and got "pass must be a string".
What would you suggest?
Comment #3
dave reidThat's not at all what I said. You have to use the literal name of the input fields separately in $edit.
Comment #4
adaddinsaneRight. I get it. Thanks.