thetuningspoon Posted June 12, 2015 Posted June 12, 2015 I am trying to set a page field via the api using a string match, like so: $p->of(false); $p->company_select = 'My Company Name, Inc.'; $p->save(); This works fine for companies that do not contain a comma, but for those with a comma, no value is set. I'm wondering if ProcessWire is trying to split this into two different values and find a match for each separately? Is there some way I can escape the comma?
thetuningspoon Posted June 15, 2015 Author Posted June 15, 2015 After some more testing I've discovered that this happens with periods (".") as well as commas.
thetuningspoon Posted June 15, 2015 Author Posted June 15, 2015 I figured it out. The problem was that I didn't have a Title field for the page I was trying to reference. So how it was working at all, I don't know. I'm now using the Title field to store the company name instead of a separate company_name field. No issues with commas or periods. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now