cforms II User Forum

Registration is currently disabled.
Guest

FAQs

Login form protected by Login LockDown.


Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

    

Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
BUG: Use custom input field NAMES & ID's
May 17, 2008
2:16 pm
Tomáš Kapler
Guest

there is a bug in Use custom input field names&ids function – the function which sanitize the name does not replace many wrong characters, like ":", non-iso chars etc. I think you should use the function which is integrated in the wordpress for creating post slugs (plus it would be necessary to remove numbers from the begining of the slug, if there are any – Id's cannot start with numbers)

May 17, 2008
4:22 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

so why don't you use proper ID's then :-)

that's what the new feature is for!

ps: how is the localization coming along?

June 6, 2008
7:47 pm
Anabelle
Guest

How do you set custom Ids and names for your fields? i keep getting "cf2_field_5" and I need to send data to another site, with other names and ids.

I can't find how to do it.

Thanks

June 6, 2008
9:14 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

look for (on main form config page):

Use custom input
field NAMES & ID's

and read the Note:

This feature replaces the default NAMEs/IDs (e.g. cf_field_12) with custom ones, either derived from the field label you have provided or by specifically declaring it via [id:XYZ],e.g. Your Name[id:the-name]. This will for instance help to feed data to third party systems (requiring certain input field names in the $_POST variable).

June 6, 2008
9:47 pm
Anabelle
Guest

Thank you!!

Can't believe I havn't seen it.

One more question, I need some id to be "specialid:19092" cause i'm submiting my info to iContact, but the ":" gets cleaned up when the form is printed.

Can I avoid this?

June 7, 2008
7:15 am
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

cforms "sanitizes" input ID's to make sure users can't use unsupported special characters etc. the colon seems to be also affected by it.

The only workaround for now is to edit lib_aux.php and add:

return $string;

just underneath the function (in the next line!):

cf_sanitize_ids($string){..

June 9, 2008
6:01 pm
Anabelle
Guest

Thank you very much!

It's working perfectly

January 19, 2013
8:31 pm
Brad
Guest

Oliver said
look for (on main form config page):

Use custom input
field NAMES & ID's

and read the Note:

This feature replaces the default NAMEs/IDs (e.g. cf_field_12) with custom ones, either derived from the field label you have provided or by specifically declaring it via [id:XYZ],e.g. Your Name[id:the-name]. This will for instance help to feed data to third party systems (requiring certain input field names in the $_POST variable).

When using the plug-in…I found that declaring the ID first helped. i.e [id:xyz]|Property Type|

For some reason it would not recognize after the ending pipe

January 24, 2013
5:13 am
cwfcambodia
Guest

I'm finding that if custom fields are enabled, I get 404 errors when moving to the next page on multi-page forms. Is this normal? Running  v14.6., WP 3.5

Cheers

February 6, 2013
2:40 pm
Oliver
Munich, Germany
Admin
Forum Posts: 6400
Member Since:
March 6, 2005
Offline

it could have to do with the names used. try using different names and providing as explicit name/id to all fields [id:xyz]

Forum Timezone: Europe/Berlin

Most Users Ever Online: 959

Currently Online:
29 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

tracedef: 43

mores: 21

Gyrus: 20

frozenwaste: 18

asuffredini: 15

photoworks: 14

Member Stats:

Guest Posters: 3734

Members: 1463

Moderators: 3

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 5335

Posts: 18699

Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass

Moderators: Paul (421), cnymike (8), sonika (95)

Administrators: Oliver (6400), Nicky (3)