[Plugin: Register Plus] Problem with comma-separated values in custom fields.
-
This one had me pulling my hair out for at least 2 hours. When you enter comma-separated values into the Extra Options parts (in order to have a drop-down list, for example), don’t use any whitespace between the values. For example, write “red,yellow,blue” and not “red, yellow, blue”. Otherwise their values are actually ” red”, ” yellow”, and ” blue” (with a leading whitespace). For the life of me, I couldn’t figure out why a simple “if(customfield[‘color’] == ‘red’) wouldn’t evaluate to true even when I echoed them side by side and they were ‘obviously’ equal.
The topic ‘[Plugin: Register Plus] Problem with comma-separated values in custom fields.’ is closed to new replies.