title, description and definition. * * @return array}> */ public static function all(): array { $name = array( 'id' => 'name', 'type' => 'text', 'label' => __( 'Your name', 'forensix-digital' ), 'required' => true, ); $email = array( 'id' => 'email', 'type' => 'email', 'label' => __( 'Your email address', 'forensix-digital' ), 'required' => true, ); $phone = array( 'id' => 'phone', 'type' => 'tel', 'label' => __( 'Phone number', 'forensix-digital' ), 'required' => true, ); $consent = array( 'id' => 'consent', 'type' => 'consent', 'label' => __( 'I agree that my details are stored so that I can be contacted.', 'forensix-digital' ), 'required' => true, ); return array( 'contact' => array( 'title' => __( 'Contact form', 'forensix-digital' ), 'description' => __( 'Name, email address and a message.', 'forensix-digital' ), 'definition' => array( 'fields' => array( $name, $email, array( 'id' => 'message', 'type' => 'textarea', 'label' => __( 'Your message', 'forensix-digital' ), 'required' => true, ), $consent, ), 'settings' => array( 'subject' => __( 'New message from your website', 'forensix-digital' ) ), ), ), 'quote' => array( 'title' => __( 'Quote request', 'forensix-digital' ), 'description' => __( 'Contact details, what the visitor needs and a rough budget.', 'forensix-digital' ), 'definition' => array( 'fields' => array( $name, $email, array( 'id' => 'service', 'type' => 'select', 'label' => __( 'What do you need?', 'forensix-digital' ), 'required' => true, 'options' => array( __( 'A new project', 'forensix-digital' ), __( 'Changes to an existing project', 'forensix-digital' ), __( 'Something else', 'forensix-digital' ), ), ), array( 'id' => 'budget', 'type' => 'text', 'label' => __( 'Rough budget', 'forensix-digital' ), ), array( 'id' => 'details', 'type' => 'textarea', 'label' => __( 'Tell us about it', 'forensix-digital' ), 'required' => true, ), $consent, ), 'settings' => array( 'subject' => __( 'New quote request', 'forensix-digital' ), 'button' => __( 'Request a quote', 'forensix-digital' ), ), ), ), 'callback' => array( 'title' => __( 'Callback request', 'forensix-digital' ), 'description' => __( 'Name, phone number and the best time to call.', 'forensix-digital' ), 'definition' => array( 'fields' => array( $name, $phone, array( 'id' => 'time', 'type' => 'radio', 'label' => __( 'Best time to call', 'forensix-digital' ), 'options' => array( __( 'Morning', 'forensix-digital' ), __( 'Afternoon', 'forensix-digital' ), __( 'Evening', 'forensix-digital' ), ), ), $consent, ), 'settings' => array( 'subject' => __( 'Please call me back', 'forensix-digital' ), 'button' => __( 'Call me back', 'forensix-digital' ), ), ), ), 'newsletter' => array( 'title' => __( 'Newsletter sign-up', 'forensix-digital' ), 'description' => __( 'An email address and a consent box. Entries are stored so you can export them.', 'forensix-digital' ), 'definition' => array( 'fields' => array( $email, array( 'id' => 'consent', 'type' => 'consent', 'label' => __( 'Yes, send me the newsletter. I can unsubscribe at any time.', 'forensix-digital' ), 'required' => true, ), ), 'settings' => array( 'subject' => __( 'New newsletter sign-up', 'forensix-digital' ), 'button' => __( 'Subscribe', 'forensix-digital' ), ), ), ), ); } }