Server Error with Display submitted form data after redirecting to another page

Home Forums Quform WordPress Server Error with Display submitted form data after redirecting to another page

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

    Hi there!

    I want to use Quform for an inscription system for children for our organisation.
    Now I followed the guidefor displaying submitted form data after redirecting to another page. But when I press “send”, I get a “Server error”

    I can’t find the error

    1. First I made a plugin “quform-formulier-kinderen.php” with this code:

    <?php
     
    /*
     * Plugin Name: Quform Doorsturen naar pagina
     * Description: Custom code for Quform.
     * Version: 1.0
     */
     
     function my_save_form_data($form)
    {
        session_start();
        $_SESSION['iphorm_7'] = $form->getValues();
    }
    add_action('iphorm_post_process_7', 'my_save_form_data');
    ?>;

    Iphorm_7 = my form

    2. I made a new page attribute named “page-bedankt.php”.
    On this page, I have a table with all the information of the form.

    
    <?php
    /**
     * Template Name: Thank You
     */
     
     /**
     Wat moet er aangepast worden naar volgend jaar?
     
     * IN DIT DOCUMENT *
     * IPHORM_7 naar IPHORM_x met x = nummer van het formulier
     * Eventuele aanpassingen eruit halen. Tabel herbekijken
     
     * DATABASE *
     * In WordPress: Database aanpassen naar inschrijvingen_kinderen_x met x = jaartal
     * MYSQL: Database aanmaken (kopiëren van 2015 met lege gegevens
     */
    session_start();?>
    
    	<div id="primary" class="site-content">
    		<div id="content" role="main">
    
    		<table style="border-collapse:collapse;border-spacing:0"><tr><th style="font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;text-align:center" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_3']); ?></th><th style="font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;text-align:center" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_4']); ?></th></tr><tr><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal">Geslacht:</td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_5']); ?></td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal">Geboortedatum:</td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;vertical-align:top"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_6']); ?></td></tr><tr><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal">Leeftijdsgroep:</td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_7']); ?></td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal">Naam School:</td><td style="font-family:Arial, sans-serif;font-size:14px;padding:10px 20px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;vertical-align:top"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_45']); ?></td></tr></table>
    
    <style type="text/css">
    .tg  {border-collapse:collapse;border-spacing:0;}
    .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
    .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
    .tg .tg-yw4l{vertical-align:top}
    .tg .tg-s6z2{text-align:center}
    .tg .tg-yw4l{vertical-align:top}
    </style>
    <table class="tg">
      <tr>
        <th class="tg-yw4l" colspan="4">Verblijfadres</th>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_10']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_13']); ?></td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_12']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4"></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4">Contactgegevens</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">E-mail</td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_18']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">Telefoon</td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_14']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">GSM moeder</td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_16']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">GSM vader</td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_15']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">GSM opvoeder</td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_17']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">Naam contactpersoon:</td>
        <td class="tg-yw4l" colspan="2">Telefoonnummer contactpersoon:</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_19']); ?></td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_21']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">Naam dokter:</td>
        <td class="tg-yw4l" colspan="2">Telefoonnummer dokter:</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_39']); ?></td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_40']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4"></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4">Opmerkingen/Afspraken thuissituatie;</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_52']); ?></td>
      </tr>
    </table>
    
    <div class="tg-wrap"><table class="tg">
      <tr>
        <th class="tg-s6z2" colspan="4">Deelname activiteiten</th>
      </tr>
      <tr>
        <td class="tg-031e" colspan="3">Mag deelnemen aan gewone speelpleinactiviteiten:</td>
        <td class="tg-031e"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_24']); ?></td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Indien nee, welke activiteiten mag/kan hij/zij niet deelnemen?</td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_25']); ?></td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Reden</td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_26']); ?></td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Bijzondere aandacht nodig om risico's te voorkomen</td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_27']); ?></td>
      </tr>
    </table></div>
    
    <div class="tg-wrap"><table class="tg">
      <tr>
        <th class="tg-s6z2" colspan="4">Medische informatie</th>
      </tr>
      <tr>
        <td class="tg-031e" colspan="3">Moet uw kind medicatie innemen tijdens een speelpleindag?</td>
        <td class="tg-031e"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_30']); ?></td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Indien ja, welke medicatie?</td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_31']); ?></td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Het is verboden om als speelpleinwerking, behalve EHBO, op eigen initiatief medische handelingen uit te voeren. Ook het verstrekken van lichte pijnstillende en koortswerende medicatie zoals Perdolan, Dafalgan of Aspirine is voorbehouden aan een arts.<br><br>De medicatie wordt steeds door de ouders afgegeven aan de pleinleiding.<br>Wij verwachten bij aanvang van het speelplein een doktersattest omtrent de medicatie.</td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Ziektes waarmee het speelplein rekening mee moet houden?</td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_32']); ?></td>
      </tr>
      <tr>
        <td class="tg-031e" colspan="4">Info nodige aanpak bij deze ziektes:</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_33']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4">Onze zoon of dochter heeft bijzondere zorg nodig voor...</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="4"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_53']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l">Dieet volgen?</td>
        <td class="tg-yw4l" colspan="3">Indien ja, welk dieet?</td>
      </tr>
      <tr>
        <td class="tg-yw4l"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_34']); ?></td>
        <td class="tg-yw4l" colspan="3"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_35']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">Ingeënt tegen klem</td>
        <td class="tg-yw4l" colspan="2">Ingeënt in jaar</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_36']); ?></td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_37']); ?></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">Bloedgroep:</td>
        <td class="tg-yw4l" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_38']); ?></td>
      </tr>
    </table></div>
    
    <div class="tg-wrap"><table class="tg">
      <tr>
        <th class="tg-s6z2" colspan="4">Aanvullende informatie</th>
      </tr>
      <tr>
        <td class="tg-031e" colspan="2">Mag gefotografeerd worden?</td>
        <td class="tg-031e" colspan="2"><?php echo esc_html($_SESSION['iphorm_7']['iphorm_7_43']); ?></td>
      </tr>
    </table></div>
    
    <div class="tg-wrap"><table class="tg">
      <tr>
        <th class="tg-031e" colspan="2">Door het controleren van deze informatie op deze pagina en eventuele wijzigingen aan te brengen, gaat u akkoord met de informatie die u aan ons heeft doorgegeven.<br>Deze inschrijving betekent NOG NIET dat uw zoon/dochter volledig is ingeschreven. Gelieve deze pagina af te drukken en te handtekenen.<br>U brengt dit formulier binnen op het speelplein tijdens 1 van de inschrijvingsdagen (zaterdag 18 of 23 juni 2016 tussen 10u en 13u, zaterdag 2 juli 2016 tussen 10u en 13u of tijdens de ochtend van de speelpleinzomer). Tijdens het afgeven van dit papier zal u ook het inschrijvingsgeld (6 euro) betalen en zal u de kans krijgen om dagticketjes en een sjaaltje te kopen.</th>
      </tr>
      <tr>
        <td class="tg-031e">Naam van de persoon:</td>
        <td class="tg-031e"></td>
      </tr>
      <tr>
        <td class="tg-yw4l">Datum:</td>
        <td class="tg-yw4l"></td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2">Handtekening:</td>
      </tr>
      <tr>
        <td class="tg-yw4l" colspan="2" rowspan="3"></td>
      </tr>
      <tr>
      </tr>
      <tr>
      </tr>
    </table></div>
    		
    		</div><!-- #content -->
    	</div><!-- #primary -->
    

    3. I changed the settings in Quform (Redirect to page “test2” = the page with page attribute “page-bedankt.php”

    4. I fill in the whole form.

    5. I get a server error 500.

    What did I wrong? And how can I fix this? It is really important for our organization that we have a blank page with all the information in a table because people need to print this page.

    Thanks in advance!

    • This topic was modified 8 years, 2 months ago by Gl3nnDC. Reason: Code didn't show
    • This topic was modified 8 years, 2 months ago by Gl3nnDC. Reason: Code "page-bedankt"
    #18369
    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. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy