Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @karmicbliss, can you provide a couple of details? I am understanding the issue a little and before I say more I want to confirm my suspicion in your case.

    Did you apply the workaround and is the approval toggle working for you in the entries list page?

    Can you tell me the field-id of the ‘website’ field (where the word Approved appears)?

    Can you also visit the entries page for the form, and save the link for the column header that sorts the list based on approved status? For me, it looks like:

    http://<site root>/wp-admin/admin.php?page=gf_entries&sort=41

    I will respond after I get these details.

    I think there is a bug that is a little hard to fix by ourselves. But there is a workaround that hopefully would work for everyone.

    It seems to me that there is a bug in the code. I am not sure about the fix for it. It is best to appeal to @katzwebdesign to provide it.

    The following code snippet in edit-form.php is an ill-formed PHP code (function has only case clauses with missing switch statement). From the looks of the details, I think the code is intended to work without changing the field name as we talked about earlier.

    I am not even sure that this is the cause of the problem.

    Zack?

    Thanks.
    Venkat

    The code snippet in edit-form.php:
    public function directory_add_default_values() {
    ?>
    case “entrylink” :
    field.label = “<?php echo esc_js( __(“Go to Entry”, “gravity-forms-addons”) ); ?>”;
    field.adminOnly = true;
    field.choices = null;
    field.inputs = null;
    field.hideInSingle = true;
    field.useAsEntryLink = ‘label’;
    field.type = ‘hidden’;
    field.disableMargins = true;

    break;

    case ‘usereditlink’:
    field.label = “<?php echo esc_js( __(“Edit”, “gravity-forms-addons”) ); ?>”;

    field.adminOnly = true;
    field.choices = null;
    field.inputs = null;
    field.hideInSingle = false;
    field.useAsEntryLink = false;
    field.type = ‘hidden’;
    field.disableMargins = 2;

    break;

    case ‘directoryapproved’:
    field.label = “<?php echo esc_js( __(“Approved? (Admin-only)”, “gravity-forms-addons”)); ?>”;

    field.adminLabel = “<?php echo esc_js( __(“Approved?”, “gravity-forms-addons”)); ?>”;
    field.adminOnly = true;

    field.choices = null;
    field.inputs = null;

    if(!field.choices)
    field.choices = new Array(new Choice(“<?php echo esc_js( __(“Approved”, “gravity-forms-addons”)); ?>”));

    field.inputs = new Array();
    for(var i=1; i<=field.choices.length; i++)
    field.inputs.push(new Input(field.id + (i/10), field.choices[i-1].text));

    field.hideInDirectory = true;
    field.hideInSingle = true;
    field.type = ‘checkbox’;

    break;
    <?php
    }

    @caordawebsol, I see this behavior as well. I need to check and see if I can spot something.

    Anyone else with an idea?

    @dankobler, before I discovered the fix I just entered, I found the same bug with trying to edit the entry to set the Approved field in a clunky manner.

    I found that you could still View, and once you are there, the Edit button therein would allow you to edit the entry, including the Approved field.

    Last year, this was how we ended up setting the approval!

    This functionality was broken a little over a year ago.

    A work-around fix for it is available thanks to @guillaumesfi.

    When you introduce the “Approved” field in the form, it comes in with “Approved? (Admin-Only)” as its field name. After the field is populated in this manner, edit it and change the field name to “Approved”.

    This change restored the functionality for me today.

Viewing 5 replies - 1 through 5 (of 5 total)