• Resolved jamessheales

    (@jamessheales)


    I have a form with ~150 fields on it and using this repeater fields plugin.

    When I change any fields with an Id that is 3 digits or more, it does not trigger the conditional fields, and the console has an error coming from “wp_repeater.js” line 42 saying “ids.shift() is not a function”

    function yeeaddons_gf_get_input_id_by_html_id(htmlId) {
    var ids = yeeaddons_gf_get_ids_by_html_id(htmlId);
    var id = ids[ids.length - 1];
    if (ids.length == 3) {
    ids.shift();
    id = ids.join(".");
    } else {
    return ids;
    }
    return id;
    }

    Looking at the code, it looks like its expecting ids to be an array, but atleast with my testing, ids is a string. So should the if statement not read like:

    if (Array.IsArray(ids) && ids.length === 3) {

    Just to clarify as well, these fields that are breaking are not even inside a repeater, and other fields with lower Ids are still working fine with conditionals.

    Please let me know what you think

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

The topic ‘[Possible Bugfix] FieldIds > 99, breaking conditional logic’ is closed to new replies.