• Is there a way to allow for spaces in the name attribute for input fields?

    I’m using a form to post data to my CRM. My CRM requires the ‘name’ attributes to be specific. For example, I have a text field that has to have name=”First Name”.

    Contact Form 7, by default, appears to erase any blank spaces and special characters.

    I understand that it’s probably for security purposes, but is there any way I can disable that or get around it?

    Thank you.

    http://wordpress.org/extend/plugins/contact-form-7/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    You can’t use space characters in name attribute value according to HTML specification.

    Thread Starter ahnkee

    (@ahnkee)

    Hmm… Yeah I see what they say there.

    Maybe it’s a HTML5 thing but I’m able to use a space. Once the data is posted, the space is replaced by + (so <input type=”text” name=”first name”>value</input> will post to &first+name=value).

    If there isn’t a way to edit the plugin to allow for it, I guess I can use a javascript to modify the name attribute.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Name attribute’ is closed to new replies.