form-tag ID
-
Where the settings for the ID? in the old version there was option to set the ID of the field.
how I set it now?
-
Each field type supports the
id:option (see the text field options for example). Nothing around this has changed in recent versions.I added screenshot
https://ibb.co/DK3sfWW
there use to be option to set the ID when adding new tag, I don’t see it.
Can other plugin cause this? I don’t have other plugins that works with your pluginAha. The ID field has been removed from the new tag-generator (since it is often misused). Add the
id:option to a form-tag manually.Great, thanks for the help. the ID is needed for special coding, how it can be misused?
is this the right format?[text* main-full-name class:main-full-name id:main-full-name minlength:2 maxlength:30]Yes, the format is correct.
The problem is that many people forget the basic rule that an ID must be unique in the whole document.
Thanks for the help, only people works with code knows ID must be unique, this why I giving other names for the each forms’ elements
I hope it’s ok to jump on this thread. I’ve been having this issue for a while. It’s not a unique ID issue… Every version since Version 5.9.3 doesn’t display the form field ID, so I can’t use the “for” attribute in the label… So I’m still on 5.9.3 on a lot of my sites… Any ideas what else might be causing this??
@hilmon set it manually like I did.
@mstudioil thanks for the reply… I also set the id manually… An example field looks like this. Maybe I’m missing something really obvious?? The example below is using CF7 v6.
[text* your-name id:contact-name-xytx placeholder "Your Name *"]But the output looks like this..
<input size="40" maxlength="400" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" aria-required="true" aria-invalid="false" placeholder="Your Name *" value="" type="text" name="your-name">Here’s an example using CF7 v5.9.3
[text* your-name id:contact-name placeholder "Your Name *"]Which give me the correct output with the id included
<input size="40" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" id="contact-name" aria-required="true" aria-invalid="false" placeholder="Your Name *" value="" type="text" name="your-name">Both sites have pretty much identical set up (server, theme and plugins) … I thought maybe the placeholder might be the issue or the Honeypot for Contact Form 7 plugin. I noticed that the newer version is adding a maxlength so I tried adding that manually as well as a class just to see if that worked but it didn’t. I removed the “for” in the label but removing both didn’t fix the issue… Nothing worked…
If you’re not experiencing the same issue then I’m clearly doing something wrong … I just wish I knew what that something was … haha. Any thoughts?
@takayukister … Any thoughts on this??
@hilmon
Try checking it with the placeholder, and use labels<label for=”main-full-name”>
Full name*</label>
[text main-full-name class:main-full-name id:main-full-name minlength:2 maxlength:30]Thanks again for the response … I just tried it out on a fresh install, using the same set up as the other sites and it’s working… which is weird …
<label for="popup-quote-name">Your Name *</label> [text* your-popup-quote-name id:popup-quote-name placeholder "Your Name *"]And here’s the result
<input size="40" maxlength="400" class="wpcf7-form-control wpcf7-text wpcf7-validates-as-required" id="popup-quote-name" aria-required="true" aria-invalid="false" placeholder="Your Name *" value="" type="text" name="your-popup-quote-name">:-/
The topic ‘form-tag ID’ is closed to new replies.