Support » Plugins » Hacks » Can't update custom fields

  • Hello,

    I have a small problem with custom fields. This is what I am trying to do:

    – Whenever a new post is added, I check what category is selected, grab the sub categories and create custom fields based on the sub categories. Each custom field has a value of “0”.
    – On each post I get the sub categories again and create checkboxes for each. When a submit button is clicked, if the checkbox is checked, the value of the custom field that matches the sub category is changed to “1”. Then I check custom field values. If value is “1” some data displays, if value is “0” nothing displays.

    Everything works great. The only problem I am facing is for custom fields with more than one word. Ex. “Firefox” works, but if the custom field is “Firefox Browser” it won’t update.

    Does anybody have any ideas why this happens?

    Thank you!

Viewing 1 replies (of 1 total)
  • This is my code:
    [Code moderated as per the Forum Rules. Please use the pastebin]

    As I said in my first post, Everything works great except for custom fields with two words. And I was doing a few tests, and if I set the custom field value to 1 manually it works. And when I uncheck the checkbox the script changes it to 0. But it won’t change to 1.

Viewing 1 replies (of 1 total)
  • The topic ‘Can't update custom fields’ is closed to new replies.