jukooz Posted October 4, 2012 Share Posted October 4, 2012 I am not sure if I am doing something wrong, but checkbox field does not save its state. Do you have any ideas why is that happening? PW 2.2.9. I am using this field for the first time. EDIT: I updated to very latest 2.2.9 and checkbox field still does not save its state. I don't know if it changes anything, but mentioned checkbox is part of repeater. Link to comment Share on other sites More sharing options...
Soma Posted October 4, 2012 Share Posted October 4, 2012 It saves state normal for me. But lately I see a "1" as the checkbox label, which I don't like really and I can't seem to change it. Edit: Ok dropping in the very latest 2.2.9 solves my issue with checkbox. Weird to say that... Link to comment Share on other sites More sharing options...
apeisa Posted October 4, 2012 Share Posted October 4, 2012 Edit: Ok dropping in the very latest 2.2.9 solves my issue with checkbox. Weird to say that... https://github.com/ryancramerdesign/ProcessWire/commit/ac246677a674490f212b46fb5533ac007bf1679e Link to comment Share on other sites More sharing options...
ryan Posted October 4, 2012 Share Posted October 4, 2012 jukooz, I tried to duplicate this by putting a checkbox in a repeater, but can't seem to duplicate it. However, a few recent commits have made modifications to the checkbox inputfield (even within 2.2.9), so you may want to grab the latest from GitHub, just in case… Link to comment Share on other sites More sharing options...
jukooz Posted October 4, 2012 Author Share Posted October 4, 2012 I've just grabbed the latest version from GitHub. Also went back to English language and default admin template and it didn't help. Maybe I'm doing something wrong. But if you wanted to check this out ryan, I can give you admin and ftp access. EDIT: removing this field and adding it again didn't help as well. Do you have any idea what else can I try? Link to comment Share on other sites More sharing options...
jukooz Posted October 5, 2012 Author Share Posted October 5, 2012 Ok, I found why it was happening. It was because of name of the field. I named it "isNew". When changed to "isnew", everything is working as it should Problem solved Link to comment Share on other sites More sharing options...
Soma Posted October 5, 2012 Share Posted October 5, 2012 "isNew" is a porperty or method of Page Class. So logically it does not work when using that field name. Thanks for finding it. This shouldn't happen and give an error when trying to name a field which will interferer with any page system properties. 1 Link to comment Share on other sites More sharing options...
jukooz Posted October 5, 2012 Author Share Posted October 5, 2012 So, is it ok to use capital letters in fields' names? Link to comment Share on other sites More sharing options...
ryan Posted October 5, 2012 Share Posted October 5, 2012 Sounds like another keyword I need to add to the reserved words list. Somehow missed that one before. You can use upper/lower if you want to, but they still do get represented in the database as all lower. Meaning, you couldn't have one field named "helloThere" and another named "hellothere". 1 Link to comment Share on other sites More sharing options...
jukooz Posted October 5, 2012 Author Share Posted October 5, 2012 So I'll be more careful now. I wanted to make a "name" field, but it was denied so I created "Name" And in this case, till now, it seems to work without any problem. So I was lucky Link to comment Share on other sites More sharing options...
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