Jump to content

radio buttons, checkboxes, drop down boxes...


helmut2509
 Share

Recommended Posts

I want to implement a set of radio buttons in a template.

As far as I understand it, I have to use the 'page reference field'.

I have made some research but unfortunately I didn't find a single example of how to build such a feature with this 'page reference field'.

can anyone give me a useful link on this topic? (should also cover checkboxes and drop down boxes)

Link to comment
Share on other sites

I think, I still need some basic facts.

So I need to create a new page with the name 'options' (as example).

I am asked for a template. Do I have to create a new template?

What should this template contain?

It would be nice if someone could give me a link to a step-by-step instruction..

Link to comment
Share on other sites

You should definitely look through that video and understand how these are built - it will be a great learning experience into how PW works, but once you do know, you can cheat with this module that allows very quick setup of all the different select types: http://modules.processwire.com/modules/process-page-field-select-creator/

  • Like 1
Link to comment
Share on other sites

Adrian what I don't like about that module is that it creates new templates/fields for every select created and not in a reusable way but maybe you want to reuse one. Is it possible as I also think it may good for others to keep it flexible.

Link to comment
Share on other sites

Hey Soma, that has also bugged me a little about my module. The reason I went with that approach was to support users entering select options using Option 2:

Option 2. MULTIPLE FIELDS - the first line is used for the field names and the first field must be 'Title'. Subsequent lines are the values for the fields, eg:

Title, Number of Beds, Number of People, Kitchen Facilities
Single, 1, 1, Fridge Only
Double, 2, 2, Fridge Only
Suite, 3, 6, Full Kitchen

Obviously in this case it isn't possible to re-use existing templates.

However, I would definitely like to improve the module so that if you're using Option 1:

Option 1. TITLE FIELD ONLY - enter one option per line, eg:

Single
Double
Suite

you could specify the existing parent and child template to use. Do you have any specific suggestions that you think would be best practice?

I am going to make my goal for the next release to be able to add "As used by Soma" to the module description :)

EDIT: New version now allows for re-use of templates and also automatic creation of manually named templates if you want to override the automatically generated names (which are based on the field title).

Edited by adrian
Link to comment
Share on other sites

You should definitely look through that video and understand how these are built - it will be a great learning experience into how PW works, but once you do know, you can cheat with this module that allows very quick setup of all the different select types: http://modules.processwire.com/modules/process-page-field-select-creator/

thanks, I finally found some useful instruction here:http://wiki.processwire.com/index.php/Page_Field .... and got a basic understandig of the procedure.

I will also have a look at your module which seems to be quite convenient.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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