Jump to content

Something inserts "/processwire/" in my form label


modifiedcontent
 Share

Recommended Posts

I have a simple front-end password update form like this:

Spoiler

<form method=post id=welcomeform>
<h4>Choose a new password</h4>
	
	<div class=field>
	<label for=pass>New Password</label>
	<input id=pass type=password name=pass placeholder='new password'>
	</div>
	
	<div class=field>
	<label for=pass2>New Password (Confirm)</label>
	<input id=pass2 type=password name=pass_confirm placeholder='new password (confirm)'>
	</div>

	<button type=submit name=welcomeform value='Send'>Set password</button>
</form>

 

In the browser the label of the second field shows up as follows:

Quote

new \processwire\password(confirm)

WTH?!

I can't figure out what is changing the label, what is inserting /processwire/ and reformatting the thing. Is this something in PW? A "helpful" thing that browsers do?

Edit:

The problem disappears if I simply rename the second field to 'Confirm Password'.

So my problem is solved, but I'll leave this here in case this is some kind of bug.

Link to comment
Share on other sites

Valid or not, it is not commonly used and is difficult to read. Nonetheless, it appears you are creating a new password object passing confirm as a parameter. Do you have the namespace set?

Link to comment
Share on other sites

rick, yeah, well, you know, that's just, like, your opinion, man.

Leaving out quotes where they are not necessary is following the html specs by the letter and makes the html a lot cleaner and easier to read than the common quotes within double-quotes within single quotes mess - my text editor gives the classes and ids their own fun colors.

So I guess something in PW somehow interpreted 'new password (confirm)' as code that it has to do something with, instead of plain placeholder text? That bit was inside quotes btw.

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...