Jump to content

isn't there has no a option list type inputfield in core ?


adrianmak
 Share

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...