• Resolved dejanj

    (@dejanj)


    Hello,

    we have an issue with the plugin, when exporting a single field with multiple radio button choices.
    For example:
    Title: Rate the Following Benefits Offered
    Benefit 1: Healthcare
    Benefit 2: Sport activities
    Benefit 3: Stay home benefits

    For each of the benefits, possible answers are:
    Below Average Average Above Average Not Offered Not Applicable

    When exporting this to excel, questions get lost, and we get answers for all benefits in one column like this:

    ___________________________
    |Rate the Following Benefits|
    —————————-|
    | Average |
    | Not offered |
    | Average |

    is there a way to export this information in a way that each question and answer are in separate columns?

    Thanks,
    Dejan

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author GravityKit

    (@gravityview)

    Hi @dejanj, thanks for your question!

    This functionality will be included in our Pro version, which became available for pre-sale today! It’s coming in July.

    Thread Starter dejanj

    (@dejanj)

    Thank you very much!
    We have Gravity Forms elite license. Does it include access to the Pro version of this plugin, or we have to purchase it separately?

    Plugin Author Doeke Norg

    (@doekenorg)

    @dejanj, Just for my curiosity, what type of field are you using? Is it the likert field? Because from my understanding of the radio option, this isn’t possible, or I’m just visualizing it wrong. In any case, what you are asking is (probably) not in the pro version, but possible with a few hooks. Could you share more about the type of field and the way you have set it up?

    Plugin Author Doeke Norg

    (@doekenorg)

    @dejanj I think I can even make it easier. I’m now quite convinced you use the likert field, as the behavior you explain is spot on with what I’m seeing ??

    You only need to do one thing, (two if you want the score instead of the value):

    First you need to split multi-field in to multiple columns:
    1. Go to Forms > Settings (so the general settings, not the settings for a specific form)
    2. Go to “Entries in Excel”
    3. Select “Split multi-fields (name, address) into multiple columns” and Save.

    Your export should now look like you want.

    If you want the score of the selection, instead of the value, please use this hook in your functions.php

    add_filter('gfexcel_export_field_value_likert', function ($value, $form_id, $input_id, $entry) {
        $field = \GFAPI::get_field($form_id, $input_id);
        if (!$field instanceof \GF_Field_Likert) {
            return $value;
        }
    
        [$row, $column] = explode(':', $entry[$input_id] ?? ':');
    
        foreach ($field->choices as $choice) {
            if (($choice['value'] ?? '') === $column) {
                return $choice['score'];
            }
        }
    
        return 0; // choice not found, so value is 0
    }, 10, 4);

    Hope this helps. In any case, this plugin is part of GravityView, and not Gravity Forms. So your license does not apply to this particular plugin. However, the Pro version of Entries in excel is very cool, and I would highly recommend!

    Thread Starter dejanj

    (@dejanj)

    @doekenorg Yes, this is it! ??

    Thanks a lot for the great support. I totally missed this configuration setting. it solved the issue.

    Have a nice day, and I will recommend you to the client!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multiple radio buttons export issue’ is closed to new replies.