form > Settings > EntryStage), drawn as a workshop in five * steps: Access, Columns (and details in EntryStage Pro), Actions, Statuses (EntryStage Pro), Display, Shortcode. * * The page is a custom Gravity Forms form settings page (GFAddOn::form_settings()). It saves with * GFAddOn::save_form_settings(), so the settings live in the form, as with every add-on. * * @package EntryStage */ namespace EntryStage; if ( ! defined( 'ABSPATH' ) ) { exit; } class Atelier { /** * Steps of the page. * * @return array slug => label. */ public static function steps() { return array( 'access' => __( 'Access', 'entrystage' ), 'columns' => __( 'Columns', 'entrystage' ), 'actions' => __( 'Actions', 'entrystage' ), 'display' => __( 'Display', 'entrystage' ), 'shortcode' => __( 'Shortcode', 'entrystage' ), ); } /** * Draws the page (and saves it first when it was posted). * * @param Addon $addon Add-on. * @param array $form Form object. */ public static function render( Addon $addon, $form ) { $message = ''; $error = false; $step = 'access'; // phpcs:ignore WordPress.Security.NonceVerification.Missing -- checked in save(). if ( isset( $_POST['estg_atelier_nonce'] ) ) { list( $message, $error, $step ) = self::save( $addon, $form ); $form = \GFAPI::get_form( (int) $form['id'] ); } Settings::flush(); $settings = Settings::get( $form ); $raw = $addon->get_form_settings( $form ); $raw = is_array( $raw ) ? $raw : array(); $form_id = (int) $form['id']; $d = Settings::defaults(); $list_url = self::list_page_url( $form_id ); $roles = self::roles(); echo '
' . esc_html__( 'Paste it in a Shortcode block of any page. The options only narrow what this list shows: the rights stay those of the Access step.', 'entrystage' ) . '
'; echo '' . esc_html__( 'Edit and Duplicate open the Gravity Forms form filled in with the entry, so they need a page that shows this form. By default it is the page chosen in the Access step; choose another one only when this list must send people to a different page (for example one page per agency, each showing the form).', 'entrystage' ) . '
'; echo '' . esc_html( $base ) . '' . esc_html( $example[0] ) . '' . esc_html( $example[1] ) . '
' . esc_html__( 'Lists of different forms can be shown on the same page.', 'entrystage' ) . '
'; self::card_close(); echo '