adrianmak Posted April 20, 2015 Share Posted April 20, 2015 In a simple situation , I just want a gender field , which in a dropdown list box hard-coded in Male and Female options Link to comment Share on other sites More sharing options...
adrian Posted April 20, 2015 Share Posted April 20, 2015 The dev version has an options fieldtype which is perfect for simple selects like this when there is no extra value in using a page field. Have a read about it here: https://processwire.com/blog/posts/new-options-fieldtype-processwire-2.5.17/ 3 Link to comment Share on other sites More sharing options...
adrianmak Posted April 20, 2015 Author Share Posted April 20, 2015 The dev version has an options fieldtype which is perfect for simple selects like this when there is no extra value in using a page field. Have a read about it here: https://processwire.com/blog/posts/new-options-fieldtype-processwire-2.5.17/ options hard-coded in the field settings, could I grab options from other data source for example, a variable in template $content-region[] = "content-top"; $content-region[] = "content-middle"; $content-region[] = "content-bottom"; Link to comment Share on other sites More sharing options...
adrian Posted April 20, 2015 Share Posted April 20, 2015 a variable in template Do you mean a field from a template? If so, then you should use a page field. Link to comment Share on other sites More sharing options...
Nico Knoll Posted April 20, 2015 Share Posted April 20, 2015 The easiest way (but probably not as fancy as the new module) is to use http://modules.processwire.com/modules/fieldtype-select/ . I use it for fields that simple, too Link to comment Share on other sites More sharing options...
adrianmak Posted April 21, 2015 Author Share Posted April 21, 2015 Do you mean a field from a template? If so, then you should use a page field. No. As I will declare several content regions in config.php $config->region[] = 'xxxxxx'; Then, in a template field setup, there are few textarea field, each of them will associated to a list field of content regions available (data source from the above $config variable). With this setup, user could have some certain of feasibility to put different textarea on different region Link to comment Share on other sites More sharing options...
LostKobrakai Posted April 21, 2015 Share Posted April 21, 2015 That does not work as you would like. But there's no real difference between hard coding in the config.php or hard coding in the settings of a options field. It may be not as easy to edit if you,ve already some texteditor open, but thats it. 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