fillnova_uid(), 'type' => $type, 'label' => $label ), $extra ); } /** * Options helper. * * @param array $labels Labels. * @return array */ public static function o( $labels ) { return array_map( function ( $l ) { return array( 'label' => $l, 'value' => $l ); }, $labels ); } /** * Template categories (slug => label). * * @return array */ public static function categories() { return apply_filters( 'fillnova_template_categories', array( 'cards' => __( 'Booking & price cards', 'fillnova' ), 'business' => __( 'Business & Contact', 'fillnova' ), 'marketing' => __( 'Marketing & Leads', 'fillnova' ), 'feedback' => __( 'Surveys & Feedback', 'fillnova' ), 'registration' => __( 'Registration & Signup', 'fillnova' ), 'events' => __( 'Event Planning', 'fillnova' ), 'hr' => __( 'Application Forms', 'fillnova' ), 'education' => __( 'Education', 'fillnova' ), 'health' => __( 'Health & Wellness', 'fillnova' ), 'nonprofit' => __( 'Nonprofit', 'fillnova' ), 'support' => __( 'Customer Support', 'fillnova' ), 'quiz' => __( 'Quizzes', 'fillnova' ), 'payment' => __( 'Payment Forms', 'fillnova' ), 'calculator' => __( 'Calculators', 'fillnova' ), ) ); } /** * Small field summary for template thumbnails. * * @param array $fields Fields. * @return array */ protected static function preview( $fields ) { $out = array(); foreach ( $fields as $f ) { if ( count( $out ) >= 7 ) { break; } $opts = array(); if ( ! empty( $f['options'] ) && is_array( $f['options'] ) ) { foreach ( array_slice( $f['options'], 0, 4 ) as $o ) { $opts[] = isset( $o['label'] ) ? (string) $o['label'] : ''; } } $out[] = array( 't' => $f['type'], 'l' => isset( $f['label'] ) ? (string) $f['label'] : '', 'w' => isset( $f['width'] ) ? $f['width'] : 'full', 'o' => $opts, ); } return $out; } /** * Template catalog (without fields, for listing). * * @return array */ public static function catalog() { $out = array(); $free = fillnova_free_templates(); $lock = ! fillnova_is_pro(); foreach ( self::all() as $id => $t ) { $is_pro = ! empty( $t['pro'] ) || ( $lock && ! in_array( $id, $free, true ) ); $out[] = array( 'id' => $id, 'name' => $t['name'], 'category' => $t['category'], 'description' => $t['description'], 'icon' => $t['icon'], 'pro' => $is_pro, 'image' => isset( $t['image'] ) ? $t['image'] : '', 'features' => isset( $t['features'] ) ? $t['features'] : array(), 'mode' => isset( $t['settings']['mode'] ) ? $t['settings']['mode'] : 'standard', 'submit' => isset( $t['settings']['submit_text'] ) ? $t['settings']['submit_text'] : __( 'Submit', 'fillnova' ), 'preview' => self::preview( $t['fields'] ), 'count' => count( array_filter( $t['fields'], function ( $f ) { return Fillnova_Fields::is_input( $f ); } ) ), ); } return $out; } /** * Get a template with fresh field IDs. * * @param string $id Template ID. * @return array|null */ public static function get( $id ) { $all = self::all(); if ( ! isset( $all[ $id ] ) ) { return null; } // Free can only load free templates; locked (Pro) ones require the Pro add-on. if ( ! fillnova_is_pro() ) { $is_pro = ! empty( $all[ $id ]['pro'] ) || ! in_array( $id, fillnova_free_templates(), true ); if ( $is_pro ) { return null; } } return $all[ $id ]; } /** * All templates. * * @return array */ public static function all() { $t = array(); $t['contact'] = array( 'name' => __( 'Contact Us', 'fillnova' ), 'category' => 'business', 'icon' => 'email-alt', 'description' => __( 'Clean contact form with subject and consent.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Send message', 'fillnova' ) ), 'fields' => array( self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'email', __( 'Email address', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'phone', __( 'Phone (optional)', 'fillnova' ), array( 'width' => 'half' ) ), self::f( 'select', __( 'What can we help with?', 'fillnova' ), array( 'options' => self::o( array( __( 'General question', 'fillnova' ), __( 'Sales', 'fillnova' ), __( 'Support', 'fillnova' ), __( 'Partnership', 'fillnova' ) ) ) ) ), self::f( 'textarea', __( 'Message', 'fillnova' ), array( 'required' => true, 'rows' => 6 ) ), self::f( 'consent', __( 'Consent', 'fillnova' ), array( 'required' => true ) ), ), ); $t['lead'] = array( 'name' => __( 'Lead Generation (Conversational)', 'fillnova' ), 'category' => 'marketing', 'icon' => 'megaphone', 'description' => __( 'One question at a time, built to convert.', 'fillnova' ), 'settings' => array( 'mode' => 'conversational', 'welcome_title' => __( 'Let’s grow your business 🚀', 'fillnova' ), 'welcome_text' => __( 'Answer 5 quick questions and we’ll send you a tailored proposal.', 'fillnova' ), 'welcome_button' => __( 'Let’s go', 'fillnova' ), ), 'fields' => array( self::f( 'text', __( 'First, what’s your name?', 'fillnova' ), array( 'required' => true, 'placeholder' => __( 'Type your answer here…', 'fillnova' ) ) ), self::f( 'email', __( 'Great! What’s your work email?', 'fillnova' ), array( 'required' => true ) ), self::f( 'text', __( 'Which company do you work for?', 'fillnova' ) ), self::f( 'radio', __( 'How big is your team?', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( '1–10', '11–50', '51–200', '200+' ) ) ) ), self::f( 'select', __( 'What’s your monthly budget?', 'fillnova' ), array( 'options' => self::o( array( '< $1,000', '$1,000 – $5,000', '$5,000 – $20,000', '$20,000+' ) ) ) ), self::f( 'textarea', __( 'Anything else we should know?', 'fillnova' ), array( 'rows' => 3 ) ), ), ); $t['feedback'] = array( 'name' => __( 'Customer Feedback', 'fillnova' ), 'category' => 'feedback', 'icon' => 'testimonial', 'description' => __( 'Ratings and open feedback with follow-up logic.', 'fillnova' ), 'fields' => array(), ); $rating = self::f( 'rating', __( 'How satisfied are you overall?', 'fillnova' ), array( 'required' => true ) ); $t['feedback']['fields'][] = $rating; $t['feedback']['fields'][] = self::f( 'textarea', __( 'Sorry to hear that. What went wrong?', 'fillnova' ), array( 'conditions' => array( 'enabled' => true, 'action' => 'show', 'match' => 'all', 'rules' => array( array( 'field' => $rating['id'], 'operator' => 'lt', 'value' => '3' ) ) ) ) ); $t['feedback']['fields'][] = self::f( 'checkbox', __( 'What did you like most?', 'fillnova' ), array( 'options' => self::o( array( __( 'Quality', 'fillnova' ), __( 'Price', 'fillnova' ), __( 'Support', 'fillnova' ), __( 'Speed', 'fillnova' ), __( 'Ease of use', 'fillnova' ) ) ), 'layout' => 'columns' ) ); $t['feedback']['fields'][] = self::f( 'yesno', __( 'Would you recommend us to a friend?', 'fillnova' ) ); $t['feedback']['fields'][] = self::f( 'email', __( 'Email (if you’d like a reply)', 'fillnova' ) ); $t['survey'] = array( 'name' => __( 'Product Survey', 'fillnova' ), 'category' => 'feedback', 'icon' => 'chart-pie', 'description' => __( 'Multi-step survey to uncover user pain points.', 'fillnova' ), 'settings' => array( 'mode' => 'multistep' ), 'fields' => array( self::f( 'heading', __( 'About you', 'fillnova' ) ), self::f( 'select', __( 'What is your role?', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( __( 'Founder', 'fillnova' ), __( 'Marketing', 'fillnova' ), __( 'Developer', 'fillnova' ), __( 'Designer', 'fillnova' ), __( 'Other', 'fillnova' ) ) ) ) ), self::f( 'radio', __( 'How often do you use our product?', 'fillnova' ), array( 'options' => self::o( array( __( 'Daily', 'fillnova' ), __( 'Weekly', 'fillnova' ), __( 'Monthly', 'fillnova' ), __( 'Rarely', 'fillnova' ) ) ) ) ), self::f( 'pagebreak', __( 'Your experience', 'fillnova' ) ), self::f( 'range', __( 'How easy is the product to use? (0–10)', 'fillnova' ), array( 'min' => 0, 'max' => 10, 'step' => 1, 'default' => '7' ) ), self::f( 'textarea', __( 'What is the biggest problem you face today?', 'fillnova' ), array( 'required' => true ) ), self::f( 'pagebreak', __( 'Wrap up', 'fillnova' ) ), self::f( 'textarea', __( 'Which feature should we build next?', 'fillnova' ) ), self::f( 'email', __( 'Email (to join our beta list)', 'fillnova' ) ), ), ); $t['job'] = array( 'name' => __( 'Job Application', 'fillnova' ), 'category' => 'hr', 'icon' => 'id-alt', 'description' => __( 'Collect applications with CV upload.', 'fillnova' ), 'settings' => array( 'mode' => 'multistep', 'submit_text' => __( 'Submit application', 'fillnova' ) ), 'fields' => array( self::f( 'name', __( 'Full name', 'fillnova' ), array( 'required' => true ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'select', __( 'Position', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( __( 'Frontend Developer', 'fillnova' ), __( 'Backend Developer', 'fillnova' ), __( 'Product Designer', 'fillnova' ), __( 'Marketing Manager', 'fillnova' ) ) ) ) ), self::f( 'pagebreak', __( 'Experience', 'fillnova' ) ), self::f( 'number', __( 'Years of experience', 'fillnova' ), array( 'min' => 0, 'max' => 50, 'width' => 'half' ) ), self::f( 'date', __( 'Earliest start date', 'fillnova' ), array( 'width' => 'half' ) ), self::f( 'url', __( 'LinkedIn / Portfolio', 'fillnova' ) ), self::f( 'file', __( 'Upload your CV', 'fillnova' ), array( 'required' => true, 'accept' => 'pdf,doc,docx', 'max_size' => 8 ) ), self::f( 'textarea', __( 'Cover letter', 'fillnova' ) ), self::f( 'consent', __( 'Consent', 'fillnova' ), array( 'required' => true, 'consent_text' => __( 'I agree that my data is stored for recruiting purposes.', 'fillnova' ) ) ), ), ); $t['event'] = array( 'name' => __( 'Event Registration', 'fillnova' ), 'category' => 'events', 'icon' => 'tickets-alt', 'description' => __( 'Register attendees with ticket type & dietary needs.', 'fillnova' ), 'fields' => array( self::f( 'name', __( 'Attendee name', 'fillnova' ), array( 'required' => true ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'text', __( 'Company', 'fillnova' ), array( 'width' => 'half' ) ), self::f( 'radio', __( 'Ticket type', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( __( 'Standard', 'fillnova' ), __( 'VIP', 'fillnova' ), __( 'Student', 'fillnova' ) ) ), 'layout' => 'inline' ) ), self::f( 'checkbox', __( 'Sessions you will attend', 'fillnova' ), array( 'options' => self::o( array( __( 'Keynote', 'fillnova' ), __( 'Workshop A', 'fillnova' ), __( 'Workshop B', 'fillnova' ), __( 'Networking dinner', 'fillnova' ) ) ) ) ), self::f( 'select', __( 'Dietary requirements', 'fillnova' ), array( 'options' => self::o( array( __( 'None', 'fillnova' ), __( 'Vegetarian', 'fillnova' ), __( 'Vegan', 'fillnova' ), __( 'Gluten-free', 'fillnova' ) ) ) ) ), ), ); $t['booking'] = array( 'name' => __( 'Appointment Booking', 'fillnova' ), 'category' => 'business', 'icon' => 'calendar-alt', 'description' => __( 'Booking requests for local businesses.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Request appointment', 'fillnova' ) ), 'fields' => array( self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'select', __( 'Service', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( __( 'Consultation', 'fillnova' ), __( 'Haircut', 'fillnova' ), __( 'Massage', 'fillnova' ), __( 'Check-up', 'fillnova' ) ) ) ) ), self::f( 'date', __( 'Preferred date', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'time', __( 'Preferred time', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'textarea', __( 'Notes', 'fillnova' ), array( 'rows' => 3 ) ), ), ); $t['dental_request'] = array( 'name' => __( 'Dental Appointment Request', 'fillnova' ), 'category' => 'health', 'icon' => 'smiley', 'description' => __( 'Patients ask for a treatment, day and time – your team confirms by phone or email.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Request appointment', 'fillnova' ), 'button_width' => 'full' ), 'fields' => array( self::f( 'select', __( 'Treatment', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( __( 'Check-up & cleaning', 'fillnova' ), __( 'Toothache / emergency', 'fillnova' ), __( 'Teeth whitening', 'fillnova' ), __( 'Implant consultation', 'fillnova' ), __( 'Kids’ check-up', 'fillnova' ) ) ) ) ), self::f( 'date', __( 'Preferred date', 'fillnova' ), array( 'required' => true, 'width' => 'half', 'min' => 1 ) ), self::f( 'select', __( 'Preferred time', 'fillnova' ), array( 'required' => true, 'width' => 'half', 'options' => self::o( array( __( 'Morning (8–12)', 'fillnova' ), __( 'Afternoon (12–16)', 'fillnova' ), __( 'Evening (16–19)', 'fillnova' ) ) ) ) ), self::f( 'yesno', __( 'Are you a new patient?', 'fillnova' ), array( 'required' => true ) ), self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), ), ); $t['table_reservation'] = array( 'name' => __( 'Restaurant Table Reservation', 'fillnova' ), 'category' => 'business', 'icon' => 'food', 'description' => __( 'Date, time, number of guests and special requests.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Reserve a table', 'fillnova' ), 'button_width' => 'full' ), 'fields' => array( self::f( 'date', __( 'Date', 'fillnova' ), array( 'required' => true, 'width' => 'third' ) ), self::f( 'select', __( 'Time', 'fillnova' ), array( 'required' => true, 'width' => 'third', 'options' => self::o( array( '12:00', '13:00', '14:00', '18:00', '19:00', '20:00', '21:00' ) ) ) ), self::f( 'select', __( 'Guests', 'fillnova' ), array( 'required' => true, 'width' => 'third', 'options' => self::o( array( '1', '2', '3', '4', '5', '6', '7', '8+' ) ) ) ), self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'width' => 'half' ) ), self::f( 'textarea', __( 'Special requests', 'fillnova' ), array( 'rows' => 2, 'placeholder' => __( 'Birthday, high chair, allergies…', 'fillnova' ) ) ), ), ); $t['salon_booking'] = array( 'name' => __( 'Beauty Salon Booking', 'fillnova' ), 'category' => 'health', 'icon' => 'heart', 'description' => __( 'Treatment, day and time for salons, cosmetics, nails and spas.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Book appointment', 'fillnova' ), 'button_width' => 'full' ), 'fields' => array( self::f( 'select', __( 'Treatment', 'fillnova' ), array( 'required' => true, 'options' => self::o( array( __( 'Haircut & styling', 'fillnova' ), __( 'Colour', 'fillnova' ), __( 'Manicure', 'fillnova' ), __( 'Pedicure', 'fillnova' ), __( 'Facial & skin care', 'fillnova' ), __( 'Lash & brow', 'fillnova' ), __( 'Massage', 'fillnova' ) ) ) ) ), self::f( 'date', __( 'Day', 'fillnova' ), array( 'required' => true, 'width' => 'half', 'min' => 0 ) ), self::f( 'time', __( 'Time', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'required' => true ) ), ), ); $t['stay_request'] = array( 'name' => __( 'Hotel & Holiday Rental Booking Request', 'fillnova' ), 'category' => 'business', 'icon' => 'admin-home', 'description' => __( 'Check-in, check-out, guests and contact details for direct bookings.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Send booking request', 'fillnova' ), 'button_width' => 'full' ), 'fields' => array( self::f( 'date', __( 'Check-in', 'fillnova' ), array( 'required' => true, 'width' => 'third', 'min' => 0 ) ), self::f( 'date', __( 'Check-out', 'fillnova' ), array( 'required' => true, 'width' => 'third', 'min' => 1 ) ), self::f( 'select', __( 'Guests', 'fillnova' ), array( 'required' => true, 'width' => 'third', 'options' => self::o( array( '1', '2', '3', '4', '5', '6' ) ) ) ), self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'width' => 'half' ) ), self::f( 'textarea', __( 'Message', 'fillnova' ), array( 'rows' => 2 ) ), ), ); $t['support'] = array( 'name' => __( 'Support Ticket', 'fillnova' ), 'category' => 'support', 'icon' => 'sos', 'description' => __( 'Priority, category and screenshot upload.', 'fillnova' ), 'fields' => array( self::f( 'email', __( 'Your email', 'fillnova' ), array( 'required' => true ) ), self::f( 'text', __( 'Subject', 'fillnova' ), array( 'required' => true ) ), self::f( 'radio', __( 'Priority', 'fillnova' ), array( 'options' => self::o( array( __( 'Low', 'fillnova' ), __( 'Normal', 'fillnova' ), __( 'High', 'fillnova' ), __( 'Urgent', 'fillnova' ) ) ), 'layout' => 'inline' ) ), self::f( 'select', __( 'Category', 'fillnova' ), array( 'options' => self::o( array( __( 'Billing', 'fillnova' ), __( 'Technical', 'fillnova' ), __( 'Account', 'fillnova' ), __( 'Other', 'fillnova' ) ) ) ) ), self::f( 'textarea', __( 'Describe the issue', 'fillnova' ), array( 'required' => true, 'rows' => 6 ) ), self::f( 'file', __( 'Screenshots', 'fillnova' ), array( 'accept' => 'jpg,jpeg,png,gif,pdf', 'max_files' => 3 ) ), ), ); $t['newsletter'] = array( 'name' => __( 'Newsletter Signup', 'fillnova' ), 'category' => 'marketing', 'icon' => 'email', 'description' => __( 'Minimal signup with interests.', 'fillnova' ), 'settings' => array( 'submit_text' => __( 'Subscribe', 'fillnova' ), 'theme' => 'minimal' ), 'fields' => array( self::f( 'text', __( 'First name', 'fillnova' ), array( 'width' => 'half' ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'checkbox', __( 'I’m interested in', 'fillnova' ), array( 'options' => self::o( array( __( 'Product news', 'fillnova' ), __( 'Tips & tutorials', 'fillnova' ), __( 'Offers', 'fillnova' ) ) ), 'layout' => 'inline' ) ), self::f( 'consent', __( 'Consent', 'fillnova' ), array( 'required' => true, 'consent_text' => __( 'Yes, send me emails. I can unsubscribe at any time.', 'fillnova' ) ) ), ), ); $t['referral'] = array( 'name' => __( 'Referral Program', 'fillnova' ), 'category' => 'marketing', 'icon' => 'groups', 'description' => __( 'Let customers refer friends.', 'fillnova' ), 'fields' => array( self::f( 'heading', __( 'Your details', 'fillnova' ) ), self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'email', __( 'Your email', 'fillnova' ), array( 'required' => true ) ), self::f( 'heading', __( 'Your friend', 'fillnova' ) ), self::f( 'text', __( 'Friend’s name', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'email', __( 'Friend’s email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'textarea', __( 'Personal note (optional)', 'fillnova' ), array( 'rows' => 3 ) ), ), ); $t['bmi'] = array( 'name' => __( 'BMI Calculator', 'fillnova' ), 'category' => 'calculator', 'icon' => 'heart', 'pro' => true, 'description' => __( 'Live BMI calculation (requires Pro calculation field).', 'fillnova' ), 'fields' => array( self::f( 'number', __( 'Height (cm)', 'fillnova' ), array( 'required' => true, 'width' => 'half', 'min' => 50, 'max' => 250 ) ), self::f( 'number', __( 'Weight (kg)', 'fillnova' ), array( 'required' => true, 'width' => 'half', 'min' => 10, 'max' => 400 ) ), ), ); $t['quiz'] = array( 'name' => __( 'Knowledge Quiz', 'fillnova' ), 'category' => 'quiz', 'icon' => 'welcome-learn-more', 'pro' => true, 'description' => __( 'Scored quiz with instant results (Pro scoring).', 'fillnova' ), 'settings' => array( 'mode' => 'conversational', 'welcome_title' => __( 'Test your knowledge!', 'fillnova' ), 'welcome_button' => __( 'Start quiz', 'fillnova' ) ), 'fields' => array( self::f( 'text', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'radio', __( 'What is the capital of France?', 'fillnova' ), array( 'required' => true, 'options' => array( array( 'label' => 'Berlin', 'value' => 'Berlin' ), array( 'label' => 'Paris', 'value' => 'Paris', 'correct' => true ), array( 'label' => 'Madrid', 'value' => 'Madrid' ) ) ) ), self::f( 'radio', __( 'Which planet is known as the Red Planet?', 'fillnova' ), array( 'required' => true, 'options' => array( array( 'label' => 'Venus', 'value' => 'Venus' ), array( 'label' => 'Mars', 'value' => 'Mars', 'correct' => true ), array( 'label' => 'Jupiter', 'value' => 'Jupiter' ) ) ) ), self::f( 'radio', __( 'How many continents are there?', 'fillnova' ), array( 'required' => true, 'options' => array( array( 'label' => '5', 'value' => '5' ), array( 'label' => '6', 'value' => '6' ), array( 'label' => '7', 'value' => '7', 'correct' => true ) ) ) ), ), ); $t['order'] = array( 'name' => __( 'Order / Payment Form', 'fillnova' ), 'category' => 'payment', 'icon' => 'cart', 'pro' => true, 'description' => __( 'Product order with PayPal checkout (Pro).', 'fillnova' ), 'fields' => array( self::f( 'name', __( 'Full name', 'fillnova' ), array( 'required' => true ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true ) ), self::f( 'select', __( 'Product', 'fillnova' ), array( 'required' => true, 'options' => array( array( 'label' => 'Basic – $19', 'value' => 'Basic', 'calc' => 19 ), array( 'label' => 'Plus – $49', 'value' => 'Plus', 'calc' => 49 ), array( 'label' => 'Premium – $99', 'value' => 'Premium', 'calc' => 99 ) ) ) ), self::f( 'number', __( 'Quantity', 'fillnova' ), array( 'required' => true, 'min' => 1, 'max' => 20, 'default' => '1' ) ), self::f( 'address', __( 'Shipping address', 'fillnova' ), array( 'required' => true ) ), ), ); $t = array_merge( $t, Fillnova_Templates_Library::templates() ); // Pro booking card designs, shown as previews so Free users can see them. // Fillnova Pro replaces these entries with the working templates. $card_features = array( __( 'Live calendar with free dates and times only', 'fillnova' ), __( 'Approve or decline bookings with one click', 'fillnova' ), __( 'Instant WhatsApp, Telegram & email alerts', 'fillnova' ), __( 'Prices, fees and live total on the card', 'fillnova' ), __( 'Customer email with a link to view or cancel', 'fillnova' ), ); $cards = array( 'dental' => array( __( 'Dental Clinic Booking', 'fillnova' ), __( 'Appointments in 30-minute slots, approved by your team.', 'fillnova' ), array( __( 'Treatment', 'fillnova' ), __( 'Date', 'fillnova' ), __( 'Time', 'fillnova' ) ) ), 'salon' => array( __( 'Beauty Salon & Cosmetics', 'fillnova' ), __( 'Treatments with prices, staff and time slots.', 'fillnova' ), array( __( 'Treatment', 'fillnova' ), __( 'Date', 'fillnova' ), __( 'Time', 'fillnova' ) ) ), 'restaurant' => array( __( 'Restaurant Table Booking', 'fillnova' ), __( 'Table reservations with seats counted per time slot.', 'fillnova' ), array( __( 'Date', 'fillnova' ), __( 'Time', 'fillnova' ), __( 'Guests', 'fillnova' ) ) ), 'rental' => array( __( 'Holiday Rental Booking', 'fillnova' ), __( 'Nights, cleaning fee and a live total – no double bookings.', 'fillnova' ), array( __( 'Check-in', 'fillnova' ), __( 'Check-out', 'fillnova' ), __( 'Guests', 'fillnova' ) ) ), 'barber' => array( __( 'Barber Shop Booking', 'fillnova' ), __( 'Pick a barber and a free slot, confirmed instantly.', 'fillnova' ), array( __( 'Barber', 'fillnova' ), __( 'Date', 'fillnova' ), __( 'Time', 'fillnova' ) ) ), 'hotel' => array( __( 'Hotel Room Booking', 'fillnova' ), __( 'Direct bookings with room price per night.', 'fillnova' ), array( __( 'Check-in', 'fillnova' ), __( 'Check-out', 'fillnova' ), __( 'Guests', 'fillnova' ) ) ), ); foreach ( $cards as $key => $c ) { $t[ 'card_' . $key ] = array( 'name' => $c[0], 'category' => 'cards', 'icon' => 'calendar-alt', 'pro' => true, 'image' => FILLNOVA_URL . 'assets/img/cards/' . $key . '.webp', 'features' => $card_features, 'description' => $c[1], 'settings' => array( 'submit_text' => __( 'Book now', 'fillnova' ) ), 'fields' => array( self::f( 'name', __( 'Your name', 'fillnova' ), array( 'required' => true ) ), self::f( 'phone', __( 'Phone', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'email', __( 'Email', 'fillnova' ), array( 'required' => true, 'width' => 'half' ) ), self::f( 'text', $c[2][0] ), self::f( 'date', $c[2][1], array( 'width' => 'half' ) ), self::f( 'text', $c[2][2], array( 'width' => 'half' ) ), ), ); } return apply_filters( 'fillnova_templates', $t ); } }