'alphagf_autostep', 'title' => esc_html__('Auto Next Step', 'alpha-addons-for-gravity-forms'), 'toggle_classes' => array('alphagf_autostep_toggle'), 'body_classes' => array('alphagf_autostep_class'), ); return $tabs; } /** * Return the scripts which should be enqueued. * * @return array */ public function scripts() { $scripts = array( array( 'handle' => 'alphagf_autostep', 'src' => $this->get_base_url() . '/js/alphagf_autostep.js', 'version' => $this->_version, 'deps' => array('jquery'), 'enqueue' => array(array($this, 'frontend_script_callback')) ), ); return array_merge(parent::scripts(), $scripts); } /** * Return the stylesheets which should be enqueued. * * @return array */ public function styles() { $styles = array( array( 'handle' => 'alphagf_autostep', 'src' => $this->get_base_url() . '/css/alphagf_autostep.css', 'version' => $this->_version, 'enqueue' => array(array($this, 'frontend_script_callback')) ), ); return array_merge(parent::styles(), $styles); } /** * Check if a field is a supported field with auto next step enabled. * * @param GF_Field $field * * @return bool */ private function is_autostep_field($field) { return $field instanceof GF_Field && ! empty($field->alphagf_autostep) && in_array($field->get_input_type(), $this->_supported_input_type, true); } public function add_autostep_custom_class($classes, $field, $form) { if ($this->is_autostep_field($field)) { $classes .= ' alphagf_autostep_field'; if (! empty($field->alphagf_autostep_hide_next)) { $classes .= ' alphagf_autostep_hide_next'; } if (! empty($field->alphagf_autostep_hide_previous)) { $classes .= ' alphagf_autostep_hide_previous'; } } return $classes; } public function add_autostep_settings($form) { ?>