Forums

[resolved] [Plugin: Register Plus] Problem with comma-separated values in custom fields. (1 post)

  1. ch5747
    Member
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.