Create a page with form values help

Home Forums Quform WordPress Create a page with form values help

This topic is: not resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #27625
    aaron1988
    Participant

    Hi,

    When i created the plugin to create a page to show the submitted form data i try and activate the plugin and get this error:

    Submitted form data

    Submitted field 1:
    Fatal error: Uncaught Error: Call to a member function getValueHtml() on null in /home/sites/5b/d/d7eb04b1cf/public_html/wp-content/plugins/quform-custom-code/form-page.php:12 Stack trace: #0 /home/sites/5b/d/d7eb04b1cf/public_html/wp-admin/includes/plugin.php(1897): include() #1 /home/sites/5b/d/d7eb04b1cf/public_html/wp-admin/plugins.php(178): plugin_sandbox_scrape(‘quform-custom-c…’) #2 {main} thrown in /home/sites/5b/d/d7eb04b1cf/public_html/wp-content/plugins/quform-custom-code/form-page.php on line 12

    and the code in this plugin file is:

    
    <?php if (!defined('ABSPATH')) exit; // Prevent direct script access
     
    /*
     * Plugin Name: Form Page
     * Description: Custom code for Quform.
     * Version: 1.0
     */
     
    // Paste in your custom code below
    ?>
    <h2>Submitted form data</h2>
    <p>Submitted field 1: <?php echo $form->getValueHtml('quform_4_5'); ?></p>
    <p>Submitted field 2: <?php echo $form->getValueHtml('quform_4_10'); ?></p>
    <p>Submitted field 3: <?php echo $form->getValueHtml('quform_4_8'); ?></p>
    

    Thanks
    Aaron

    • This topic was modified 6 years, 10 months ago by aaron1988. Reason: adding backsticks
    #27675
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2025 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy