modifiedcontent

Something inserts "/processwire/" in my form label

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.

Share this post


Link to post
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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

I guess it's th file compiler, try to disable it for the template (and clear cache).

  • Like 1

Share this post


Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By louisstephens
      So I have been creating an internal web app over the last couple months, and am finally on the last piece of the puzzle, customizable forms. I thought I could just create a view basic forms and use a select option to let them select the form, and my template file could just output the form based on their selection. Easy enough. However, I have since ran into a slight head scratcher. Not all the forms are the same and they might vary greatly between each other. 
      Has anyone done something similar to this? In an ideal world, I would use form builder, but I really dont want them to have access to it. They are currently constrained to a few pages in the backend, which is why I was trying to think of a way for them to select a few fields (like from a page select), and then render the selections on the front end based on what was selected.
    • By anttila
      We are developing an App that sends data over the Internet to ProcessWire (POST/JSON). We want password to be protected somehow when sending it, but I should be able to compare it to PW's passwords. We were thinking of using md5 encryption, but PW uses different encryption.
      How can I be sure that user has active account when they use the App?
    • By louisstephens
      Hopefully this is pretty easy/quick. I have a signup form with name and email and on submit, a new page is created under "Entries". Is it possible to check if the name (which has two fields for first and last) and or the email is already registered and display an error?
    • By louisstephens
      I have been using the wiresmtpmail module in a few installs for sending out automated emails etc etc, and it works flawlessly. However, I now need to send an email when a user submits a form, and for the life of me I can not figure out how to get the form to submit.
      if(isset($_POST['Submit'])) { $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $toName = $sanitizer->text($input->post->fullname); $toEmail = $sanitizer->email($input->post->email); $phone = $sanitizer->text($input->post->phone); $comments = $sanitizer->text($input->post->comments); $subject = $page->store_name . $page->title; $numSent = wireMail($toName, '', $subject, $textBody, $options); } If I remove the if statement, the form submits just fine, however you can just refresh the page (without adding anything to the fields), and it will submit a blank email every refresh. Has anyone gotten this working with a submit button?
    • By kalimati
      I am using sanitizer->textarea to sanitize and format the message inputted. I've tried various options including newlineReplacement but have been unable to convert newlines to <br> tags. Although the PHP nl2br function works as expected. Any suggestions?
      Thanks.