Getting a default value from last select box in a chained select?

Using chained select add-on out of the box is it possible to get the final select to populate automatically? Once the user get’s to that select there is only 1 value on all selections. Example:

The user selects A, then B, then C is populated because there is only one value that aligns with B and there will never be another choice. In all actuality, this field is a price and it should also be disabled.

Is this possible out of the box?

Hi Avi!

I am having the same need, this should work: https://docs.gravityforms.com/gform_chained_selects_input_choices/#2-define-the-default-choice

This should work:

/*
* 17 = form_id
* 1 = field_id
* 3 = Third Chained select
* $choices[0] => 0 is the first option
*/ 
add_filter( 'gform_chained_selects_input_choices_17_1_3', function( $choices ) {
    $choices[0]['isSelected'] = true;
    return $choices;
} );

// And the css to hack and set the field as not editable by the user
#input_17_1_3_container select{
    pointer-events: none; /* No pointer here! */
}
© 2008 - 2019. Gravity Forms is a project by Rocketgenius Inc.