0

I run a football/soccer site and I am looking to create a feature on my site that asks a member several questions about themselves, club etc. All they will need to do is answer the questions. The questions will be predefined by myself and will probably use Channel Form for them to fill in.

What would be the best way to create the question fields. Is just one field for each question using text area type. Or is there a better way.

1 Answer 1

1

Needs to understand how flexible your solution should be, how often questions can change and how do you want to use answers in future.

  1. As you suggest, it can be just a fields: one question - one field.

    + it is fast to build and no additional costs

    - every time when you need to add/edit question - you need to create/edit EE field and edit template

  2. Create a master channel entry where filled in questions inside the Grid fieldtype (it is can be even in same channel which you will use for answers). Then in Channel form you need to create same list using original list as pattern.

example (just base):

{exp:channel:entries entry_id="1" dynamic="off"}
    {exp:channel:form channel="users_answers"}
        {grid_field}
            <input type="hidden" name="grid_field[rows][row_id_{grid_field:count}][col_id_1]" value="{question}">
             <textarea name="grid_field[rows][row_id_{grid_field:count}}][col_id_2]"></textarea>
        {/grid_field}
    {/exp:channel:form}
{/exp:channel:entries}
  1. Use forms modules like

DevDemon Forms

ProForm Drag and Drop Form Builder

Freeform

But based on your description I think that you don't need to use form builder and stay with solution #2 or even #1 if your question will not change for next 2-3y.

1
  • Thanks for the response, the questions will be based on something like the following format. link Questions should not really change that much, probably depend on what response I get to the people answering whether I change them. I have attempted just to create textarea fields and use the questions as the field label but there is a limit on the size. (Can this be changed is it advisable) I did look at using Grid but wasn't sure how to set up for each question. But will have another play with it. Feb 9, 2015 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.