{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"landingPage": "/",
	"login": true,
	"preferredVersions": {
		"php": "8.3",
		"wp": "latest"
	},
	"steps": [
		{
			"step": "installPlugin",
			"pluginData": {
				"resource": "wordpress.org/plugins",
				"slug": "contact-forms"
			},
			"options": {
				"activate": true
			}
		},
		{
			"step": "mkdir",
			"path": "/wordpress/wp-content/mu-plugins"
		},
		{
			"step": "writeFile",
			"path": "/wordpress/wp-content/mu-plugins/playground-demo-mail.php",
			"data": "<?php\n/**\n * Playground demo helper: report emails as sent.\n *\n * WordPress Playground has no mail transport, so wp_mail() always fails.\n * Contact Forms shows the form's error message when the notification email\n * cannot be sent, which would make every demo submission look broken even\n * though it is saved. Short-circuiting wp_mail() keeps the demo honest:\n * submissions succeed and the success message is shown.\n */\nadd_filter( 'pre_wp_mail', '__return_true' );\n"
		},
		{
			"step": "setSiteOptions",
			"options": {
				"permalink_structure": "/%postname%/",
				"blogname": "Contact Forms Demo"
			}
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $avail_fields = get_option('accua_forms_avail_fields', array()); $avail_fields['start_date'] = array('version' => 2, 'id' => 'start_date', 'name' => 'Preferred Start Date', 'type' => 'date', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['resume'] = array('version' => 2, 'id' => 'resume', 'name' => 'Resume / CV', 'type' => 'file', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => 'pdf,doc,docx', 'min_date' => '', 'max_date' => ''); $avail_fields['department'] = array('version' => 2, 'id' => 'department', 'name' => 'Department', 'type' => 'select', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Sales\\r\\nMarketing\\r\\nEngineering\\r\\nSupport\\r\\nHuman Resources\\r\\nOther\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['contact_reason'] = array('version' => 2, 'id' => 'contact_reason', 'name' => 'Reason for Contact', 'type' => 'radio', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"General Inquiry\\r\\nSupport Request\\r\\nPartnership\\r\\nFeedback\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['sessions'] = array('version' => 2, 'id' => 'sessions', 'name' => 'Sessions of Interest', 'type' => 'multiselect', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Keynote\\r\\nWorkshop A: Frontend Dev\\r\\nWorkshop B: Backend Dev\\r\\nNetworking Lunch\\r\\nPanel Discussion\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['dietary'] = array('version' => 2, 'id' => 'dietary', 'name' => 'Dietary Requirements', 'type' => 'multicheckbox', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Vegetarian\\r\\nVegan\\r\\nGluten-free\\r\\nHalal\\r\\nNo restrictions\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['agree_terms'] = array('version' => 2, 'id' => 'agree_terms', 'name' => 'I agree to the Terms and Conditions', 'type' => 'checkbox', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['related_article'] = array('version' => 2, 'id' => 'related_article', 'name' => 'Related Article', 'type' => 'post-select', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['related_pages'] = array('version' => 2, 'id' => 'related_pages', 'name' => 'Related Pages', 'type' => 'post-multicheckbox', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['source_page'] = array('version' => 2, 'id' => 'source_page', 'name' => 'Source Page', 'type' => 'hidden', 'description' => '', 'default_value' => 'wordpress-playground-demo', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['satisfaction'] = array('version' => 2, 'id' => 'satisfaction', 'name' => 'Overall, how satisfied are you with our service?', 'type' => 'radio', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Very satisfied\\r\\nSatisfied\\r\\nNeutral\\r\\nDissatisfied\\r\\nVery dissatisfied\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['recommend'] = array('version' => 2, 'id' => 'recommend', 'name' => 'How likely are you to recommend us to a colleague?', 'type' => 'radio', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Definitely\\r\\nProbably\\r\\nNot sure\\r\\nProbably not\\r\\nDefinitely not\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['used_features'] = array('version' => 2, 'id' => 'used_features', 'name' => 'Which features do you use?', 'type' => 'multicheckbox', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Contact forms\\r\\nFile uploads\\r\\nEmail notifications\\r\\nSpam protection\\r\\nSubmission archive\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['poll_comments'] = array('version' => 2, 'id' => 'poll_comments', 'name' => 'Anything else you would like to tell us?', 'type' => 'textarea', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['service'] = array('version' => 2, 'id' => 'service', 'name' => 'Service Needed', 'type' => 'select', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Website Design\\r\\nE-commerce Development\\r\\nSEO Optimization\\r\\nMaintenance and Support\\r\\nOther\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['budget'] = array('version' => 2, 'id' => 'budget', 'name' => 'Estimated Budget', 'type' => 'select', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => \"Under 1,000\\r\\n1,000 - 5,000\\r\\n5,000 - 10,000\\r\\nOver 10,000\", 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); $avail_fields['deadline'] = array('version' => 2, 'id' => 'deadline', 'name' => 'Desired Completion Date', 'type' => 'date', 'description' => '', 'default_value' => '', 'default_date_value' => '', 'allowed_values' => '', 'allowed_extensions' => '', 'min_date' => '', 'max_date' => ''); update_option('accua_forms_avail_fields', $avail_fields); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); if (!is_array($forms)) $forms = array(); $lastid = (int) get_option('accua_forms_lastid', 0); $admin_email = get_option('admin_email'); $variants = array('toplabel' => 'Contact Us (Top Labels)', 'sidebyside' => 'Contact Us (Side by Side Labels)', 'inlinelabel' => 'Contact Us (Inline Labels)'); foreach ($variants as $layout => $title) { $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => $title, 'layout' => $layout, 'success_message' => '<div><h2>Thank you {first_name}!</h2><p>We received your message and will get back to you shortly.</p></div>', 'error_message' => '<div><h2>Something went wrong.</h2><p>Please try again or contact us directly.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => $admin_email, 'emails_bcc' => '', 'admin_emails_subject' => 'New contact request from {first_name} {last_name}', 'admin_emails_message' => '{__submitted_html}', 'confirmation_emails_subject' => 'We received your message', 'confirmation_emails_message' => '<div><p>Dear {first_name}, thank you for contacting us. We will reply as soon as possible.</p></div>', 'fields' => array('first_name' => array('version' => 2, 'istance_id' => 'first_name', 'widget_number' => '', 'ref' => 'first_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'last_name' => array('version' => 2, 'istance_id' => 'last_name', 'widget_number' => '', 'ref' => 'last_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'email' => array('version' => 2, 'istance_id' => 'email', 'widget_number' => '', 'ref' => 'email', 'required' => true, 'css_class' => '', 'css_id' => ''), 'telephone' => array('version' => 2, 'istance_id' => 'telephone', 'widget_number' => '', 'ref' => 'telephone', 'required' => false, 'country_code' => 'US', 'css_class' => '', 'css_id' => ''), 'contact_reason' => array('version' => 2, 'istance_id' => 'contact_reason', 'widget_number' => '', 'ref' => 'contact_reason', 'required' => true, 'css_class' => '', 'css_id' => ''), 'message' => array('version' => 2, 'istance_id' => 'message', 'widget_number' => '', 'ref' => 'message', 'required' => true, 'css_class' => '', 'css_id' => ''))); } update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $lastid = (int) get_option('accua_forms_lastid', 0); $admin_email = get_option('admin_email'); $styles = array('border-on-title-inline' => 'Workshop Registration (Inline Legend)', 'border-on-title-outside' => 'Workshop Registration (Title Above)', 'border-on-title-inside' => 'Workshop Registration (Title Inside)', 'border-off-title-on' => 'Workshop Registration (Title Without Border)'); foreach ($styles as $style => $title) { $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => $title, 'layout' => 'toplabel', 'success_message' => '<div><h2>Registration complete!</h2><p>Thank you {first_name}, we saved your seat. Check your email for the confirmation.</p></div>', 'error_message' => '<div><h2>Registration failed.</h2><p>Please try again.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => $admin_email, 'emails_bcc' => '', 'admin_emails_subject' => 'New workshop registration: {first_name} {last_name}', 'admin_emails_message' => '{__submitted_html}', 'confirmation_emails_subject' => 'Workshop registration confirmed', 'confirmation_emails_message' => '<div><p>Dear {first_name}, your registration has been confirmed. See you at the workshop!</p></div>', 'fields' => array('__fieldset-begin-1' => array('version' => 2, 'istance_id' => '__fieldset-begin-1', 'widget_number' => 1, 'ref' => '__fieldset-begin', 'label' => 'Personal Information', 'fieldset_style' => $style, 'required' => false, 'css_class' => '', 'css_id' => ''), 'first_name' => array('version' => 2, 'istance_id' => 'first_name', 'widget_number' => '', 'ref' => 'first_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'last_name' => array('version' => 2, 'istance_id' => 'last_name', 'widget_number' => '', 'ref' => 'last_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'email' => array('version' => 2, 'istance_id' => 'email', 'widget_number' => '', 'ref' => 'email', 'required' => true, 'css_class' => '', 'css_id' => ''), '__fieldset-end-1' => array('version' => 2, 'istance_id' => '__fieldset-end-1', 'widget_number' => 1, 'ref' => '__fieldset-end', 'required' => false, 'css_class' => '', 'css_id' => ''), '__fieldset-begin-2' => array('version' => 2, 'istance_id' => '__fieldset-begin-2', 'widget_number' => 2, 'ref' => '__fieldset-begin', 'label' => 'Workshop Preferences', 'fieldset_style' => $style, 'required' => false, 'css_class' => '', 'css_id' => ''), 'sessions' => array('version' => 2, 'istance_id' => 'sessions', 'widget_number' => '', 'ref' => 'sessions', 'required' => true, 'css_class' => '', 'css_id' => ''), 'dietary' => array('version' => 2, 'istance_id' => 'dietary', 'widget_number' => '', 'ref' => 'dietary', 'required' => false, 'css_class' => '', 'css_id' => ''), '__fieldset-end-2' => array('version' => 2, 'istance_id' => '__fieldset-end-2', 'widget_number' => 2, 'ref' => '__fieldset-end', 'required' => false, 'css_class' => '', 'css_id' => ''), 'agree_terms' => array('version' => 2, 'istance_id' => 'agree_terms', 'widget_number' => '', 'ref' => 'agree_terms', 'required' => true, 'custom_required_message' => 'You must accept the Terms and Conditions to complete your registration.', 'css_class' => '', 'css_id' => ''))); } update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $lastid = (int) get_option('accua_forms_lastid', 0); $admin_email = get_option('admin_email'); $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => 'Job Application', 'layout' => 'toplabel', 'success_message' => '<div><h2>Application received.</h2><p>Thank you {first_name}! We will review your application and get back to you within 5 business days.</p></div>', 'error_message' => '<div><h2>Submission error.</h2><p>Please try again.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => $admin_email, 'emails_bcc' => '', 'admin_emails_subject' => 'New job application: {first_name} {last_name}', 'admin_emails_message' => '{__submitted_html}', 'confirmation_emails_subject' => 'Application received', 'confirmation_emails_message' => '<div><p>Dear {first_name}, your application has been received.</p></div>', 'fields' => array('first_name' => array('version' => 2, 'istance_id' => 'first_name', 'widget_number' => '', 'ref' => 'first_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'last_name' => array('version' => 2, 'istance_id' => 'last_name', 'widget_number' => '', 'ref' => 'last_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'email' => array('version' => 2, 'istance_id' => 'email', 'widget_number' => '', 'ref' => 'email', 'required' => true, 'css_class' => '', 'css_id' => ''), 'telephone' => array('version' => 2, 'istance_id' => 'telephone', 'widget_number' => '', 'ref' => 'telephone', 'required' => true, 'country_code' => 'US', 'css_class' => '', 'css_id' => ''), 'department' => array('version' => 2, 'istance_id' => 'department', 'widget_number' => '', 'ref' => 'department', 'required' => true, 'css_class' => '', 'css_id' => ''), 'start_date' => array('version' => 2, 'istance_id' => 'start_date', 'widget_number' => '', 'ref' => 'start_date', 'required' => false, 'css_class' => '', 'css_id' => ''), 'resume' => array('version' => 2, 'istance_id' => 'resume', 'widget_number' => '', 'ref' => 'resume', 'required' => true, 'css_class' => '', 'css_id' => ''), 'message' => array('version' => 2, 'istance_id' => 'message', 'widget_number' => '', 'ref' => 'message', 'required' => false, 'css_class' => '', 'css_id' => ''))); update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $lastid = (int) get_option('accua_forms_lastid', 0); $admin_email = get_option('admin_email'); $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => 'Request a Quote', 'layout' => 'toplabel', 'success_message' => '<div><h2>Quote request received.</h2><p>Thank you {first_name}! We will prepare your quote and get back to you within 2 business days.</p></div>', 'error_message' => '<div><h2>Something went wrong.</h2><p>Please try again.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => $admin_email, 'emails_bcc' => '', 'admin_emails_subject' => 'New quote request: {first_name} {last_name}', 'admin_emails_message' => '{__submitted_html}', 'confirmation_emails_subject' => 'We received your quote request', 'confirmation_emails_message' => '<div><p>Dear {first_name}, we received your request and will reply with a quote shortly.</p></div>', 'fields' => array('__fieldset-begin-1' => array('version' => 2, 'istance_id' => '__fieldset-begin-1', 'widget_number' => 1, 'ref' => '__fieldset-begin', 'label' => 'Your Details', 'fieldset_style' => 'border-on-title-inline', 'required' => false, 'css_class' => '', 'css_id' => ''), 'first_name' => array('version' => 2, 'istance_id' => 'first_name', 'widget_number' => '', 'ref' => 'first_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'last_name' => array('version' => 2, 'istance_id' => 'last_name', 'widget_number' => '', 'ref' => 'last_name', 'required' => true, 'css_class' => '', 'css_id' => ''), 'email' => array('version' => 2, 'istance_id' => 'email', 'widget_number' => '', 'ref' => 'email', 'required' => true, 'css_class' => '', 'css_id' => ''), 'telephone' => array('version' => 2, 'istance_id' => 'telephone', 'widget_number' => '', 'ref' => 'telephone', 'required' => false, 'country_code' => 'US', 'css_class' => '', 'css_id' => ''), '__fieldset-end-1' => array('version' => 2, 'istance_id' => '__fieldset-end-1', 'widget_number' => 1, 'ref' => '__fieldset-end', 'required' => false, 'css_class' => '', 'css_id' => ''), '__fieldset-begin-2' => array('version' => 2, 'istance_id' => '__fieldset-begin-2', 'widget_number' => 2, 'ref' => '__fieldset-begin', 'label' => 'Address', 'fieldset_style' => 'border-on-title-inline', 'required' => false, 'css_class' => '', 'css_id' => ''), 'address' => array('version' => 2, 'istance_id' => 'address', 'widget_number' => '', 'ref' => 'address', 'required' => false, 'css_class' => '', 'css_id' => ''), 'city' => array('version' => 2, 'istance_id' => 'city', 'widget_number' => '', 'ref' => 'city', 'required' => false, 'css_class' => '', 'css_id' => ''), 'country' => array('version' => 2, 'istance_id' => 'country', 'widget_number' => '', 'ref' => 'country', 'required' => false, 'css_class' => '', 'css_id' => ''), '__fieldset-end-2' => array('version' => 2, 'istance_id' => '__fieldset-end-2', 'widget_number' => 2, 'ref' => '__fieldset-end', 'required' => false, 'css_class' => '', 'css_id' => ''), '__fieldset-begin-3' => array('version' => 2, 'istance_id' => '__fieldset-begin-3', 'widget_number' => 3, 'ref' => '__fieldset-begin', 'label' => 'Project Information', 'fieldset_style' => 'border-on-title-inline', 'required' => false, 'css_class' => '', 'css_id' => ''), 'service' => array('version' => 2, 'istance_id' => 'service', 'widget_number' => '', 'ref' => 'service', 'required' => true, 'css_class' => '', 'css_id' => ''), 'budget' => array('version' => 2, 'istance_id' => 'budget', 'widget_number' => '', 'ref' => 'budget', 'required' => false, 'css_class' => '', 'css_id' => ''), 'deadline' => array('version' => 2, 'istance_id' => 'deadline', 'widget_number' => '', 'ref' => 'deadline', 'required' => false, 'css_class' => '', 'css_id' => ''), 'message' => array('version' => 2, 'istance_id' => 'message', 'widget_number' => '', 'ref' => 'message', 'required' => false, 'css_class' => '', 'css_id' => ''), '__fieldset-end-3' => array('version' => 2, 'istance_id' => '__fieldset-end-3', 'widget_number' => 3, 'ref' => '__fieldset-end', 'required' => false, 'css_class' => '', 'css_id' => ''), 'agree_terms' => array('version' => 2, 'istance_id' => 'agree_terms', 'widget_number' => '', 'ref' => 'agree_terms', 'required' => true, 'custom_required_message' => 'You must accept the Terms and Conditions to request a quote.', 'css_class' => '', 'css_id' => ''))); update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $lastid = (int) get_option('accua_forms_lastid', 0); $admin_email = get_option('admin_email'); $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => 'Quick Feedback (Custom Validation Messages)', 'layout' => 'toplabel', 'success_message' => '<div><h2>Thanks for your feedback!</h2><p>We appreciate you taking the time to write to us.</p></div>', 'error_message' => '<div><h2>Error.</h2><p>Please try again.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => $admin_email, 'emails_bcc' => '', 'admin_emails_subject' => 'New feedback received', 'admin_emails_message' => '{__submitted_html}', 'confirmation_emails_subject' => '', 'confirmation_emails_message' => '', 'fields' => array('first_name' => array('version' => 2, 'istance_id' => 'first_name', 'widget_number' => '', 'ref' => 'first_name', 'required' => true, 'custom_required_message' => 'Please tell us your name, so we know who we are talking to.', 'css_class' => '', 'css_id' => ''), 'email' => array('version' => 2, 'istance_id' => 'email', 'widget_number' => '', 'ref' => 'email', 'required' => true, 'custom_format_message' => 'Please enter a valid email address like name@example.com so we can reply to you.', 'css_class' => '', 'css_id' => ''), 'message' => array('version' => 2, 'istance_id' => 'message', 'widget_number' => '', 'ref' => 'message', 'required' => true, 'custom_required_message' => 'Please write at least a short message before sending.', 'css_class' => '', 'css_id' => ''))); update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $lastid = (int) get_option('accua_forms_lastid', 0); $admin_email = get_option('admin_email'); $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => 'Content Feedback (Post Select)', 'layout' => 'toplabel', 'success_message' => '<div><h2>Feedback received.</h2><p>Thank you for your feedback on our content!</p></div>', 'error_message' => '<div><h2>Error.</h2><p>Please try again.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => $admin_email, 'emails_bcc' => '', 'admin_emails_subject' => 'Content feedback received', 'admin_emails_message' => '{__submitted_html}', 'confirmation_emails_subject' => '', 'confirmation_emails_message' => '', 'fields' => array('__html-1' => array('version' => 2, 'istance_id' => '__html-1', 'widget_number' => 1, 'ref' => '__html', 'default_value' => '<div style=\"background:#f0f7ff;border:1px solid #c0d8f0;border-radius:4px;padding:12px 16px;margin-bottom:1em;\"><strong>Help us improve!</strong> Select the article you are providing feedback about, then tell us what you think.</div>', 'required' => false, 'css_class' => '', 'css_id' => ''), 'related_article' => array('version' => 2, 'istance_id' => 'related_article', 'widget_number' => '', 'ref' => 'related_article', 'required' => true, 'post_type' => 'post', 'css_class' => '', 'css_id' => ''), 'related_pages' => array('version' => 2, 'istance_id' => 'related_pages', 'widget_number' => '', 'ref' => 'related_pages', 'required' => false, 'post_type' => 'page', 'css_class' => '', 'css_id' => ''), 'email' => array('version' => 2, 'istance_id' => 'email', 'widget_number' => '', 'ref' => 'email', 'required' => true, 'css_class' => '', 'css_id' => ''), 'message' => array('version' => 2, 'istance_id' => 'message', 'widget_number' => '', 'ref' => 'message', 'required' => true, 'css_class' => '', 'css_id' => ''), 'source_page' => array('version' => 2, 'istance_id' => 'source_page', 'widget_number' => '', 'ref' => 'source_page', 'required' => false, 'css_class' => '', 'css_id' => ''))); update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $lastid = (int) get_option('accua_forms_lastid', 0); $lastid++; $forms[$lastid] = array('use_ajax' => true, 'title' => 'Customer Satisfaction Poll', 'layout' => 'toplabel', 'success_message' => '<div><h2>Thanks for taking part!</h2><p>Your anonymous answers have been recorded.</p></div>', 'error_message' => '<div><h2>Error.</h2><p>Please try again.</p></div>', 'emails_from_name' => '', 'emails_from' => '', 'admin_emails_to' => '', 'emails_bcc' => '', 'admin_emails_subject' => '', 'admin_emails_message' => '', 'confirmation_emails_subject' => '', 'confirmation_emails_message' => '', 'fields' => array('satisfaction' => array('version' => 2, 'istance_id' => 'satisfaction', 'widget_number' => '', 'ref' => 'satisfaction', 'required' => true, 'css_class' => '', 'css_id' => ''), 'recommend' => array('version' => 2, 'istance_id' => 'recommend', 'widget_number' => '', 'ref' => 'recommend', 'required' => true, 'css_class' => '', 'css_id' => ''), 'used_features' => array('version' => 2, 'istance_id' => 'used_features', 'widget_number' => '', 'ref' => 'used_features', 'required' => false, 'css_class' => '', 'css_id' => ''), 'poll_comments' => array('version' => 2, 'istance_id' => 'poll_comments', 'widget_number' => '', 'ref' => 'poll_comments', 'required' => false, 'css_class' => '', 'css_id' => ''))); update_option('accua_forms_saved_forms', $forms); update_option('accua_forms_lastid', $lastid); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; wp_insert_post(array('post_title' => 'Getting Started with Our Platform', 'post_content' => '<!-- wp:paragraph --><p>Welcome to our platform! This guide covers the basics.</p><!-- /wp:paragraph -->', 'post_status' => 'publish', 'post_type' => 'post')); wp_insert_post(array('post_title' => 'Tips for Better Productivity', 'post_content' => '<!-- wp:paragraph --><p>Here are our top tips for getting the most out of your workflow.</p><!-- /wp:paragraph -->', 'post_status' => 'publish', 'post_type' => 'post')); wp_insert_post(array('post_title' => 'Frequently Asked Questions', 'post_content' => '<!-- wp:paragraph --><p>Answers to the questions we hear most often.</p><!-- /wp:paragraph -->', 'post_status' => 'publish', 'post_type' => 'post')); wp_insert_post(array('post_title' => 'Company News and Updates', 'post_content' => '<!-- wp:paragraph --><p>The latest news from our team.</p><!-- /wp:paragraph -->', 'post_status' => 'publish', 'post_type' => 'post')); wp_insert_post(array('post_title' => 'Feature Spotlight: Contact Forms', 'post_content' => '<!-- wp:paragraph --><p>A deep dive into our contact forms plugin features.</p><!-- /wp:paragraph -->', 'post_status' => 'publish', 'post_type' => 'post')); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $forms = get_option('accua_forms_saved_forms', array()); $fids = array_keys($forms); $notice = '<!-- wp:paragraph --><p><em>Note: this is a live demo running in WordPress Playground. Form submissions are saved to the database but email notifications are not delivered. You are already logged in: explore the <a href=\"/wp-admin/admin.php?page=accua_forms_submissions_list\">submissions archive</a> and the <a href=\"/wp-admin/admin.php?page=accua_forms\">dashboard statistics</a>.</em></p><!-- /wp:paragraph -->'; $mkpage = function($title, $slug, $heading, $body, $fid) use ($notice) { return wp_insert_post(array('post_title' => $title, 'post_name' => $slug, 'post_content' => '<!-- wp:heading --><h2>' . $heading . '</h2><!-- /wp:heading -->' . $body . $notice . '<!-- wp:shortcode -->[accua-form fid=\"' . $fid . '\"]<!-- /wp:shortcode -->', 'post_status' => 'publish', 'post_type' => 'page')); }; $mkpage('Contact Us: Top Labels', 'contact-top-labels', 'Label Layout: Top Labels', '<!-- wp:paragraph --><p>Labels are placed above their fields. This is the default and most versatile layout: a single column that reads naturally on any screen width and leaves room for long labels.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>The layout is selected per form in the form editor. This is the same contact form shown on the <a href=\"/contact-side-labels/\">Side by Side Labels</a> and <a href=\"/contact-inline-labels/\">Inline Labels</a> pages, so you can compare the three variants directly.</p><!-- /wp:paragraph -->', $fids[0]); $mkpage('Contact Us: Side by Side Labels', 'contact-side-labels', 'Label Layout: Side by Side', '<!-- wp:paragraph --><p>Labels sit on the left, next to their fields. Long forms become visually shorter and easier to scan on wide screens; on narrow screens the fields stack automatically.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>This is the same contact form shown on the <a href=\"/contact-top-labels/\">Top Labels</a> and <a href=\"/contact-inline-labels/\">Inline Labels</a> pages, so you can compare the three variants directly.</p><!-- /wp:paragraph -->', $fids[1]); $mkpage('Contact Us: Inline Labels', 'contact-inline-labels', 'Label Layout: Inline Labels', '<!-- wp:paragraph --><p>Labels appear inside the fields as floating labels: while you type, the label moves above the value, so the hint never disappears. A compact and modern look, great for short forms.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>This is the same contact form shown on the <a href=\"/contact-top-labels/\">Top Labels</a> and <a href=\"/contact-side-labels/\">Side by Side Labels</a> pages, so you can compare the three variants directly.</p><!-- /wp:paragraph -->', $fids[2]); $mkpage('Field Groups: Inline Legend', 'groups-inline-legend', 'Field Groups: Inline Legend', '<!-- wp:paragraph --><p>Related fields can be grouped with the special Group field. Both groups in this registration form use the classic style: a border around the group with the title rendered as an inline legend on the border edge.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>The style is chosen per group with the Border and Title dropdown in the form editor. Compare the same form with the <a href=\"/groups-title-above/\">Title Above</a>, <a href=\"/groups-title-inside/\">Title Inside</a> and <a href=\"/groups-title-no-border/\">Title Without Border</a> variants. Two more options exist for purely structural grouping: border only, and no border with no title.</p><!-- /wp:paragraph -->', $fids[3]); $mkpage('Field Groups: Title Above', 'groups-title-above', 'Field Groups: Title Above the Border', '<!-- wp:paragraph --><p>In this variant the group title is rendered above the bordered box, like a section heading standing on top of the group.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>This is the same registration form shown on the <a href=\"/groups-inline-legend/\">Inline Legend</a>, <a href=\"/groups-title-inside/\">Title Inside</a> and <a href=\"/groups-title-no-border/\">Title Without Border</a> pages: only the Border and Title setting of the two groups changes.</p><!-- /wp:paragraph -->', $fids[4]); $mkpage('Field Groups: Title Inside', 'groups-title-inside', 'Field Groups: Title Inside the Border', '<!-- wp:paragraph --><p>In this variant the group title is rendered inside the bordered box, above the first field of the group.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>This is the same registration form shown on the <a href=\"/groups-inline-legend/\">Inline Legend</a>, <a href=\"/groups-title-above/\">Title Above</a> and <a href=\"/groups-title-no-border/\">Title Without Border</a> pages: only the Border and Title setting of the two groups changes.</p><!-- /wp:paragraph -->', $fids[5]); $mkpage('Field Groups: Title Without Border', 'groups-title-no-border', 'Field Groups: Title Without Border', '<!-- wp:paragraph --><p>In this variant the group title is rendered without any border, giving a light section heading that separates the form without drawing boxes.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>This is the same registration form shown on the <a href=\"/groups-inline-legend/\">Inline Legend</a>, <a href=\"/groups-title-above/\">Title Above</a> and <a href=\"/groups-title-inside/\">Title Inside</a> pages: only the Border and Title setting of the two groups changes.</p><!-- /wp:paragraph -->', $fids[6]); $mkpage('Job Application', 'job-application', 'Job Application: File Upload and Date Picker', '<!-- wp:paragraph --><p>A focused hiring form. The resume field accepts only pdf, doc and docx files and supports drag and drop; invalid files are rejected immediately, before the form is even submitted. The preferred start date uses a date picker, and the phone number is validated with United States number rules.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>Submissions of this form are preloaded with the Job Candidate lead status: open the <a href=\"/wp-admin/admin.php?page=accua_forms_submissions_list\">submissions archive</a> to see how leads can be classified.</p><!-- /wp:paragraph -->', $fids[7]); $mkpage('Request a Quote', 'request-a-quote', 'Request a Quote: a Long Real World Form', '<!-- wp:paragraph --><p>A complete quote request split into three groups (contact details, address and project information), all using the same inline legend style so the form stays visually consistent. It includes select fields for service and budget, a date picker for the desired deadline, and address fields.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>The Terms and Conditions checkbox is the last field before the submit button, where users expect it.</p><!-- /wp:paragraph -->', $fids[8]); $mkpage('Custom Validation Messages', 'custom-validation-messages', 'Custom Validation Messages', '<!-- wp:paragraph --><p>Every field can override the default validation texts: both the required field message and the wrong format message, either globally in the field definition or per single form. Submit this form empty, or type an invalid email address, and read the resulting errors.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>In this form the name and the message fields use custom required messages, and the email field uses a custom format message.</p><!-- /wp:paragraph -->', $fids[9]); $mkpage('Content Feedback', 'content-feedback', 'Content Feedback: Fields Populated from Posts', '<!-- wp:paragraph --><p>The article dropdown is a Post Select field: it loads published posts lazily via AJAX, with search and pagination, so it stays fast even with thousands of posts. The related pages below it are a Post Checkboxes field, populated from pages.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>The form also contains a custom HTML block (the blue box) and a hidden field that silently records where the submission came from.</p><!-- /wp:paragraph -->', $fids[10]); $mkpage('Customer Poll', 'customer-poll', 'Customer Poll: Anonymous Survey', '<!-- wp:paragraph --><p>A poll built with radio scales, a multiple choice checkbox question and an optional comment box. No name or email is collected and no notification emails are sent: answers only go to the submissions archive.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>30 sample responses are preloaded: open the <a href=\"/wp-admin/admin.php?page=accua_forms_submissions_list\">archive</a> and filter by this form to browse them.</p><!-- /wp:paragraph -->', $fids[11]); $welcome_body = '<!-- wp:paragraph --><p>This site is a live demo of the Contact Forms by Cimatti plugin for WordPress. Every page shows one focused example, so you can evaluate each capability on its own. All forms submit via AJAX, store their submissions in the archive and support notification and confirmation emails.</p><!-- /wp:paragraph --><!-- wp:heading {\"level\":3} --><h3>Label layouts</h3><!-- /wp:heading --><!-- wp:paragraph --><p>The same contact form rendered with the three available label layouts:</p><!-- /wp:paragraph --><!-- wp:list --><ul class=\"wp-block-list\"><!-- wp:list-item --><li><a href=\"/contact-top-labels/\">Top Labels</a>: the default layout, labels above the fields</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/contact-side-labels/\">Side by Side Labels</a>: labels on the left, compact on wide screens</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/contact-inline-labels/\">Inline Labels</a>: floating labels inside the fields</li><!-- /wp:list-item --></ul><!-- /wp:list --><!-- wp:heading {\"level\":3} --><h3>Field group styles</h3><!-- /wp:heading --><!-- wp:paragraph --><p>The same workshop registration form rendered with four different group title styles (the Border and Title setting of the Group field):</p><!-- /wp:paragraph --><!-- wp:list --><ul class=\"wp-block-list\"><!-- wp:list-item --><li><a href=\"/groups-inline-legend/\">Inline Legend</a>: classic legend on the border edge</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/groups-title-above/\">Title Above</a>: heading on top of the bordered box</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/groups-title-inside/\">Title Inside</a>: heading inside the bordered box</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/groups-title-no-border/\">Title Without Border</a>: light section heading, no box</li><!-- /wp:list-item --></ul><!-- /wp:list --><!-- wp:heading {\"level\":3} --><h3>Real world examples</h3><!-- /wp:heading --><!-- wp:paragraph --><p>Focused forms for common scenarios:</p><!-- /wp:paragraph --><!-- wp:list --><ul class=\"wp-block-list\"><!-- wp:list-item --><li><a href=\"/job-application/\">Job Application</a>: file upload with allowed extensions, date picker, phone validation</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/request-a-quote/\">Request a Quote</a>: a long form with field groups, selects and address fields</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/custom-validation-messages/\">Custom Validation Messages</a>: per field error texts</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/content-feedback/\">Content Feedback</a>: fields populated from posts and pages, hidden tracking field</li><!-- /wp:list-item --><!-- wp:list-item --><li><a href=\"/customer-poll/\">Customer Poll</a>: anonymous survey with no email notifications</li><!-- /wp:list-item --></ul><!-- /wp:list --><!-- wp:heading {\"level\":3} --><h3>Explore the admin area</h3><!-- /wp:heading --><!-- wp:paragraph --><p>You are already logged in as admin. Open the <a href=\"/wp-admin/admin.php?page=accua_forms_submissions_list\">submissions archive</a> (preloaded with more than 120 sample submissions, including GDPR anonymized entries, spam and trashed items), the <a href=\"/wp-admin/admin.php?page=accua_forms\">statistics dashboard</a> and the <a href=\"/wp-admin/admin.php?page=accua_forms_list\">form editor</a> to see how each demo form is built.</p><!-- /wp:paragraph --><!-- wp:paragraph --><p><em>Note: this is a live demo running in WordPress Playground. Form submissions are saved to the database but email notifications are not delivered.</em></p><!-- /wp:paragraph -->'; $welcome_id = wp_insert_post(array('post_title' => 'Welcome', 'post_name' => 'welcome', 'post_content' => $welcome_body, 'post_status' => 'publish', 'post_type' => 'page')); update_option('show_on_front', 'page'); update_option('page_on_front', $welcome_id); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; $mk = function($slug, $label) { $p = get_page_by_path($slug); if (!$p) return ''; return '<!-- wp:navigation-link {\"label\":\"' . $label . '\",\"type\":\"page\",\"id\":' . $p->ID . ',\"url\":\"' . esc_url(get_permalink($p)) . '\",\"kind\":\"post-type\"} /-->'; }; $nav = '<!-- wp:navigation-link {\"label\":\"Home\",\"url\":\"' . esc_url(home_url('/')) . '\",\"kind\":\"custom\"} /-->'; $nav .= '<!-- wp:navigation-submenu {\"label\":\"Label Layouts\",\"url\":\"/contact-top-labels/\",\"kind\":\"custom\"} -->' . $mk('contact-top-labels', 'Top Labels') . $mk('contact-side-labels', 'Side by Side Labels') . $mk('contact-inline-labels', 'Inline Labels') . '<!-- /wp:navigation-submenu -->'; $nav .= '<!-- wp:navigation-submenu {\"label\":\"Field Groups\",\"url\":\"/groups-inline-legend/\",\"kind\":\"custom\"} -->' . $mk('groups-inline-legend', 'Inline Legend') . $mk('groups-title-above', 'Title Above') . $mk('groups-title-inside', 'Title Inside') . $mk('groups-title-no-border', 'Title Without Border') . '<!-- /wp:navigation-submenu -->'; $nav .= '<!-- wp:navigation-submenu {\"label\":\"Examples\",\"url\":\"/job-application/\",\"kind\":\"custom\"} -->' . $mk('job-application', 'Job Application') . $mk('request-a-quote', 'Request a Quote') . $mk('custom-validation-messages', 'Custom Messages') . $mk('content-feedback', 'Content Feedback') . $mk('customer-poll', 'Customer Poll') . '<!-- /wp:navigation-submenu -->'; wp_insert_post(array('post_title' => 'Demo Pages', 'post_type' => 'wp_navigation', 'post_status' => 'publish', 'post_content' => $nav)); ?>"
		},
		{
			"step": "runPHP",
			"code": "<?php require_once '/wordpress/wp-load.php'; global $wpdb; $forms = get_option('accua_forms_saved_forms', array()); $fids = array_keys($forms); $ts = $wpdb->prefix . 'accua_forms_submissions'; $tv = $wpdb->prefix . 'accua_forms_submissions_values'; $fn = array('Alice','Bob','Carol','David','Eva','Frank','Grace','Henry','Iris','Jack','Karen','Leo','Marta','Nick','Olga','Paul','Rita','Sam','Tina','Hugo','Vera','Walter','Nadia','Yuri'); $ln = array('Johnson','Smith','Williams','Brown','Martinez','Garcia','Lee','Wilson','Taylor','Anderson','Thomas','Moore','Rossi','Bianchi','Kim','Novak','Weber','Silva','Costa','Meyer','Olsen','Dubois','Fischer','Marino'); $msgs = array('I would like to learn more about your services.','Can you help me with a new project?','Great plugin, I just wanted to say thanks!','I have a question about pricing.','Please contact me regarding a partnership.','We are interested in your enterprise plan.','How do I integrate this with my existing site?','Looking forward to hearing from you.'); $reasons = array('General Inquiry','Support Request','Partnership','Feedback'); $ins = function($fid, $uri, $vals, $lead, $days) use ($wpdb, $ts, $tv) { $now = time(); $submitted = $now - ($days * 86400) - rand(0, 70000); $created = $submitted - rand(60, 900); $wpdb->insert($ts, array('afs_form_id' => (string) $fid, 'afs_post_id' => 0, 'afs_ip' => '192.168.1.' . rand(10, 250), 'afs_uri' => $uri, 'afs_referrer' => '', 'afs_lang' => 'en_US', 'afs_created' => gmdate('Y-m-d H:i:s', $created), 'afs_submitted' => gmdate('Y-m-d H:i:s', $submitted), 'afs_status' => 0, 'afs_stats' => json_encode(array('user_agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)', 'platform' => rand(0, 3) ? 'desktop' : 'mobile', 'tentatives' => 1, 'submit_method' => 'ajax')), 'afs_lead_status' => $lead)); $sid = $wpdb->insert_id; foreach ($vals as $k => $v) { if ($v[1] === '') continue; $wpdb->insert($tv, array('afsv_sub_id' => $sid, 'afsv_field_id' => $k, 'afsv_type' => $v[0], 'afsv_value' => $v[1])); } return $sid; }; $contact_leads = array(2, 0, 3, 5, 0, 2, 0, -1, 0, 3, 2, 0, 5, 0, 2, 0); $contact = array(array($fids[0], '/contact-top-labels/', 16), array($fids[1], '/contact-side-labels/', 12), array($fids[2], '/contact-inline-labels/', 12)); $n = 0; foreach ($contact as $cf) { for ($i = 0; $i < $cf[2]; $i++) { $f = $fn[$n % 24]; $l = $ln[($n * 5 + 3) % 24]; $ins($cf[0], $cf[1], array('first_name' => array('textfield', $f), 'last_name' => array('textfield', $l), 'email' => array('autoreply_email', strtolower($f) . '.' . strtolower($l) . '@example.com'), 'telephone' => array('telephone', ($i % 3 === 0) ? '+1 202 555 01' . sprintf('%02d', $i) : ''), 'contact_reason' => array('radio', $reasons[$n % 4]), 'message' => array('textarea', $msgs[$n % 8])), $contact_leads[$i % 16], rand(0, 59)); $n++; } } $sess = array('Keynote', 'Workshop A: Frontend Dev', 'Workshop B: Backend Dev', 'Networking Lunch', 'Panel Discussion'); $diet = array('Vegetarian', 'Vegan', 'Gluten-free', '', 'No restrictions', ''); $wuris = array('/groups-inline-legend/', '/groups-title-above/', '/groups-title-inside/', '/groups-title-no-border/'); for ($v = 0; $v < 4; $v++) { for ($i = 0; $i < 6; $i++) { $f = $fn[($n + $i) % 24]; $l = $ln[($n + $i * 7) % 24]; $ins($fids[3 + $v], $wuris[$v], array('first_name' => array('textfield', $f), 'last_name' => array('textfield', $l), 'email' => array('autoreply_email', strtolower($f) . '.' . strtolower($l) . '@example.com'), 'sessions' => array('multiselect', $sess[$i % 5] . ($i % 2 ? ', ' . $sess[($i + 2) % 5] : '')), 'dietary' => array('multicheckbox', $diet[$i % 6])), 0, rand(0, 45)); } $n += 6; } $deps = array('Engineering', 'Sales', 'Marketing', 'Support', 'Human Resources'); for ($i = 0; $i < 10; $i++) { $f = $fn[($i * 3 + 1) % 24]; $l = $ln[($i * 11 + 2) % 24]; $ins($fids[7], '/job-application/', array('first_name' => array('textfield', $f), 'last_name' => array('textfield', $l), 'email' => array('autoreply_email', strtolower($f) . '.' . strtolower($l) . '@example.com'), 'telephone' => array('telephone', '+1 202 555 02' . sprintf('%02d', $i)), 'department' => array('select', $deps[$i % 5]), 'message' => array('textarea', 'I am excited to apply for a position in your team.')), ($i < 8) ? 1 : 0, rand(0, 59)); } $services = array('Website Design', 'E-commerce Development', 'SEO Optimization', 'Maintenance and Support'); $budgets = array('Under 1,000', '1,000 - 5,000', '5,000 - 10,000', 'Over 10,000'); $cities = array('New York', 'Milan', 'Berlin', 'Madrid', 'Lyon', 'Austin', 'Toronto', 'Oslo'); $countries = array('United States', 'Italy', 'Germany', 'Spain', 'France', 'United States', 'Canada', 'Norway'); $quote_leads = array(2, 4, 2, 0, 4, 2, 3, 0, 2, 4); for ($i = 0; $i < 10; $i++) { $f = $fn[($i * 7 + 4) % 24]; $l = $ln[($i * 13 + 5) % 24]; $ins($fids[8], '/request-a-quote/', array('first_name' => array('textfield', $f), 'last_name' => array('textfield', $l), 'email' => array('autoreply_email', strtolower($f) . '.' . strtolower($l) . '@example.com'), 'service' => array('select', $services[$i % 4]), 'budget' => array('select', $budgets[$i % 4]), 'city' => array('textfield', $cities[$i % 8]), 'country' => array('select', $countries[$i % 8])), $quote_leads[$i], rand(0, 59)); } for ($i = 0; $i < 8; $i++) { $f = $fn[($i * 5 + 9) % 24]; $ins($fids[9], '/custom-validation-messages/', array('first_name' => array('textfield', $f), 'email' => array('autoreply_email', strtolower($f) . '.feedback@example.com'), 'message' => array('textarea', $msgs[($i + 3) % 8])), 0, rand(0, 40)); } for ($i = 0; $i < 5; $i++) { $f = $fn[($i * 9 + 6) % 24]; $ins($fids[10], '/content-feedback/', array('email' => array('autoreply_email', strtolower($f) . '.reader@example.com'), 'message' => array('textarea', 'Very useful article, thanks for publishing it.'), 'source_page' => array('hidden', 'wordpress-playground-demo')), 0, rand(0, 30)); } $sat = array('Very satisfied', 'Satisfied', 'Satisfied', 'Neutral', 'Very satisfied', 'Dissatisfied', 'Satisfied', 'Very satisfied', 'Neutral', 'Satisfied'); $rec = array('Definitely', 'Probably', 'Definitely', 'Not sure', 'Probably', 'Probably not', 'Definitely', 'Probably', 'Definitely', 'Not sure'); $feat = array('Contact forms', 'Contact forms, File uploads', 'Email notifications', 'Contact forms, Spam protection', 'Spam protection', 'Contact forms, Submission archive', 'File uploads, Email notifications', 'Contact forms'); for ($i = 0; $i < 30; $i++) { $ins($fids[11], '/customer-poll/', array('satisfaction' => array('radio', $sat[$i % 10]), 'recommend' => array('radio', $rec[($i + 2) % 10]), 'used_features' => array('multicheckbox', $feat[$i % 8])), 0, rand(0, 59)); } $anon = $wpdb->get_col(\"SELECT afs_id FROM $ts WHERE afs_form_id = '{$fids[0]}' ORDER BY afs_id ASC LIMIT 3\"); $anon2 = $wpdb->get_col(\"SELECT afs_id FROM $ts WHERE afs_form_id = '{$fids[1]}' ORDER BY afs_id ASC LIMIT 1\"); foreach (array_merge($anon, $anon2) as $aid) { $wpdb->update($ts, array('afs_anonymized' => 1, 'afs_ip' => '0.0.0.0'), array('afs_id' => $aid)); $wpdb->update($tv, array('afsv_value' => 'deleted@site.invalid'), array('afsv_sub_id' => $aid, 'afsv_field_id' => 'email')); $wpdb->query($wpdb->prepare(\"UPDATE $tv SET afsv_value = '[Anonymized]' WHERE afsv_sub_id = %d AND afsv_field_id != 'email'\", $aid)); } $trash = $wpdb->get_col(\"SELECT afs_id FROM $ts WHERE afs_form_id = '{$fids[1]}' AND afs_anonymized = 0 ORDER BY afs_id DESC LIMIT 3\"); foreach ($trash as $tid) { $wpdb->update($ts, array('afs_status' => -1), array('afs_id' => $tid)); } ?>"
		}
	]
}
