carlitoselmago Posted May 29, 2020 Share Posted May 29, 2020 I'm building a fieldtype/inputfield to visually select a grid like Bootstrap since it's the first time coding such thing, I'm basing my code in FieldtypeColorPicker since the base structure is the same, a graphical UI helper to finally output a string as value. The problem is I try to save the value as something like "1,2,3" referencing the index of each column selected but it gets converted as an int value so "1,2,3" becomes "1" if input random text it gets converted as "0". Here is the code: https://github.com/carlitoselmago/FieldtypeGridSpace Here's an screenshot of how it looks Link to comment Share on other sites More sharing options...
flydev Posted May 29, 2020 Share Posted May 29, 2020 I tested it, and it look like its working, see my capture : - columns echo'd on frontend - ok - debug dumps - ok 2 Link to comment Share on other sites More sharing options...
carlitoselmago Posted May 29, 2020 Author Share Posted May 29, 2020 Oh ok, I guess then it's an issue of simply cached install of the module? Actually I don't understand how this part works very well 1 Link to comment Share on other sites More sharing options...
flydev Posted May 29, 2020 Share Posted May 29, 2020 Yes maybe the cache. Try to clear the compiled files and your browser cache then refresh the module. Quote Actually I don't understand how this part works very well Expand What I did is, downloading your module from Github, installed it, dumped the var with TracyDebugger - which you should install in a hurry - and tada, it seem it worked ?? 1 Link to comment Share on other sites More sharing options...
carlitoselmago Posted May 29, 2020 Author Share Posted May 29, 2020 Thank you guys, i cleared the cache in the modules list view and it works as espected now. 2 Link to comment Share on other sites More sharing options...
louisstephens Posted May 29, 2020 Share Posted May 29, 2020 Not to keep a thread going, but will this eventually become available in the modules directory? I really like the approach you have taken! 2 Link to comment Share on other sites More sharing options...
carlitoselmago Posted May 29, 2020 Author Share Posted May 29, 2020 Thanks! Yes i made it for the specific needs of a client website but the idea is to pollish it a bit and publish it in the Processwire repository, I want to add some options like custom amount of cols etc 2 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