Buy Now
Sign in

How can I keep the form data with ImageValidation?

shd , October 27 2007, 01:28
S
shd 58
October 27 2007, 01:28 #3121
Hi I tried this FAQ and I get this error code:

content\chronocontact.php(178) : eval()'d code on line 42

I,m using version 2.3.2



My code is:
line 42
function showform($message='')
{
global $database, $mosConfig_live_site, $mosConfig_absolute_path;
if ( $message ) {
echo "<div style="border:1px solid silver;border-left:
6px solid red;padding:6px;">$message"; }
$formname = mosGetParam( $_REQUEST, 'chronoformname', '0' );
and
line 185:
if ( trim($paramsvalues->imagever) == 'Yes' ) {
session_start();
$chrono_verification = strtolower($_POST['chrono_verification']);
if ( md5($chrono_verification ) != $_SESSION['chrono_verification'] ) {
$message = "Incorrecte code - probeer het op nieuw.";
showform($message);
return;
}else{
unset($_SESSION['chrono_verification']);
}
}
Did I something wrong?
Groetjes,
Stephanie

Post edited by: shd, at: 2007/10/26 21:29
Edited to add Code tags<br><br>Post edited by: GreyHead, at: 2007/10/27 00:04
GreyHead 64
October 27 2007, 04:02 #3122
Hi Stephanie,

I suggest that you upgrade to the latest release as this supports (mostly) keeping data with ImageValidation without hacking the code.

The error report you've put above looks as though the error is in the eval'd code - that is the code in your HTML code field for the form (or possibly one of the other fields). Try looking at line 42 of that.

Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
S
shd 58
October 29 2007, 16:50 #3174
Hi Bob,
I installed the new version 2.3.5 but I have a problem to installing de new mambot V 0.5 and can't install it because the installer said that this file is missing:
www/media/install_4725ab7cc5165/chronocontact/jquery.js does not exist!

I tested the form without the mambot and again in this new version all the data is gone after type a wrong validation.

    [*]What must I do to install the new mambot, so I can use my form in a another content. Where can I find the missing file?
    [/*]
    [*]What must I do to keep the data in the form? I'm using javascript but I think that is not a problem. That is working perfect. Maybe I miss something in the form to keep the data.[/*]


Groetjes,
Stephanie


<div class="reservering_chrono">



<div class="box_chrono_groep">
<div class="naast_chrono">
<label>U wilt reserveren voor*</label>

<div class="box_chrono">
<select name="reserveren" id="reserveren">
<option value="Uw keuze">Maak hier uw keuze</option>
<option value="Dag bezoek sauna, 9.00-23.30">Dag bezoek sauna faciliteiten, 9.00-23.30</option>
<option value="Avond bezoek sauna, 17.30-23.30">Avond bezoek sauna faciliteiten, 17.30-23.30</option>
<option value="Salland arrangement, vanaf 10.00">Salland arrangement, vanaf 10.00</option>
</select><span class="hint">U dient minimaal een sauna bezoek of arrangement te boeken om verder te gaan. (Bij alle arrangementen zijn de sauna faciliteiten inbegrepen).</span> </div>
</div>
</div>
          
          
          <div class="box_chrono_groep">
           <div class="beginnaast_chrono">
           <label>Aanvulling op uw arrangement of sauna bezoek </label>
           <div class="box_chrono">
           <select name="aanvulling" id="aanvulling">
           <option>Maak hier uw keuze</option>
           <option value="Hotstone massage 25 min">Hotstone massage 25 min</option>
           <option value="Hotstone massage 40 min">Hotstone massage 40 min</option>
           <option value="Ayurvedische massage">Ayurvedische massage 40 min</option>
           <option value="rasul 30 min">Rasul 30 min</option>
         </select><span class="hint">Alleen te boeken in combinatie met een sauna bezoek
           of arrangement.</span>         </div>
         </div>
          </div>
          
          <div class="box_chrono_groep">
           <div class="beginnaast_chrono">
           <label>Aantal personen* </label>
           <div class="box_chrono">
           <select name="personen" id="personen">
           <option value="----">----</option>
           <option value="1">1</option>
           <option value="2">2</option>
           <option value="3">3</option>
           <option value="4">4</option>
           <option value="5">5</option>
           <option value="6">6</option>
           <option value="7">7</option>
           <option value="8">8</option>
           <option value="9">9</option>
           <option value="10">10</option>
         </select><span class="hint">Wilt u voor een groep reserveren die groter is dan 10 personen, dan kunt u het beste telefonisch contact met ons opnemen.</span>         </div>
         </div>
          </div>
          
          
          <div class="box_chrono_groep">
           <div class="beginnaast_chrono">
           <label>Gewenste datum*</label>
          
<div class="box_chrono">
<input name="reserveringsdatum" type="text" id="reserveringsdatum" value = "-------------------"
      size = "11" readonly />
Klik
<a href="javascript:toonKalender('kalender1')">hier</a> </div>
           </div>
          </div>
          
          <div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Uw aankomsttijd*</label>
<div class="box_chrono">
<select name="aankomstuur" id="aankomstuur">
<option value="----">----</option>
<option value="09">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
</select>
<select name="aankomstmin" id="aankomstmin">
<option value="----">----</option>
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
</select>
</div>
</div>
</div>
          
<div class="box_chrono_groep">
         <div class="beginnaast_chrono">
         <label >Eventuele opmerkingen</label>
        
        
         <div class="box_chrono">
         <textarea name="opmerkingen" cols="45" rows="3" id="opmerkingen"></textarea>
     </div>
       </div>
</div>
</div>






<div class="reservering_chrono">
<div class="box_chrono_groep">
<div class="beginnaast_chrono"><label>Aanhef</label>


<div class="box_chrono">
<select name="aanhef" id="aanhef">
<option value="Mevr.">Mevr.</option>
<option value="Dhr.">Dhr.</option>
</select>
</div>
</div>

</div>
        <div class="box_chrono_groep">
         <div class="naast_chrono">
         <label>Voorletter(s)*</label>
        
         <div class="box_chrono">
         <input name="voorletters" type="text" id="voorletters" size="10" maxlength="50" />
         </div>
</div>
       </div>
        <div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Achternaam*</label>

<div class="box_chrono">
<input name="achternaam" type="text" id="achternaam" size="40" maxlength="50" />
</div>
</div>
</div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Adres*</label>

<div class="box_chrono">
<input name="adres" onkeypress="return alpha(event)" type="text" id="adres" size="40" maxlength="100" />
</div>
</div>

</div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Huisnummer*</label>
<div class="box_chrono">
<input name="huisnr" type="text" class="box_chrono" id="huisnr" size="5" maxlength="20" />
</div>
</div>
</div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Postcode*</label>

<div class="box_chrono">
<input name="ppccijfers" type="text" id="ppccijfers" size="4" maxlength="4" />

<label></label>

<input name="pcletters" onkeypress="return alpha(event)" type="text" id="pcletters" size="1" maxlength="2" />
</div> </div>


</div>
      
       <div class="box_chrono_groep">
       <div class="naast_chrono">
       <label>Woonplaats*</label>
       <div class="box_chrono">
       <input name="woonplaats" type="text" id="woonplaats" size="40" maxlength="70" />
     </div>
     </div>
     </div>
       <div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Telefoonnr.*</label>
<div class="box_chrono">
<input name="telnr" type="text" id="telnr" size="14" maxlength="10" />
<span class="hint">Voorbeeld: 0572382323<br />
mobiel nummer is ook toegestaan</span> </div>
</div>

     </div>
      
       <div class="box_chrono_groep">
       <div class="naast_chrono">
       <label>Mobielnr. </label>
       <div class="box_chrono">
       <input name="mobiel" type="text" id="mobiel" size="14" maxlength="10" />
       <span class="hint">Voorbeeld: 0572382323<br />
   mobiel nummer is ook toegestaan</span> </div>
</div>
     </div>
       <div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>E-mail adres*</label>
<div class="box_chrono">
<input name="emailone" type="text" id="email1" size="40" maxlength="100">
</div>
</div>
</div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Geboortedatum</label>
<div class="box_chrono">
<select name="dag" id="dag">
<option value="dag">dag</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
<select name="maand" id="maand">
<option value="maand">maand</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select name="jaar" id="jaar">
<option value=" jaar"> jaar </option>
<option value="  1907"> 1907 </option>
<option value="  1908"> 1908 </option>
<option value="  1909"> 1909 </option>
<option value="  1910"> 1910 </option>
<option value="  1911"> 1911 </option>
<option value="  1912"> 1912 </option>
<option value="  1913"> 1913 </option>
<option value="  1914"> 1914 </option>
<option value="  1915"> 1915 </option>
<option value="  1916"> 1916 </option>
<option value="  1917"> 1917 </option>
<option value="  1918"> 1918 </option>
<option value="  1919"> 1919 </option>
<option value="  1920"> 1920 </option>
<option value="  1921"> 1921 </option>
<option value="  1922"> 1922 </option>
<option value="  1923"> 1923 </option>
<option value="  1924"> 1924 </option>
<option value="  1925"> 1925 </option>
<option value="  1926"> 1926 </option>
<option value="  1927"> 1927 </option>
<option value="  1928"> 1928 </option>
<option value="  1929"> 1929 </option>
<option value="  1930"> 1930 </option>
<option value="  1931"> 1931 </option>
<option value="  1932"> 1932 </option>
<option value="  1933"> 1933 </option>
<option value="  1934"> 1934 </option>
<option value="  1935"> 1935 </option>
<option value="  1936"> 1936 </option>
<option value="  1937"> 1937 </option>
<option value="  1938"> 1938 </option>
<option value="  1939"> 1939 </option>
<option value="  1940"> 1940 </option>
<option value="  1941"> 1941 </option>
<option value="  1942"> 1942 </option>
<option value="  1943"> 1943 </option>
<option value="  1944"> 1944 </option>
<option value="  1945"> 1945 </option>
<option value="  1946"> 1946 </option>
<option value="  1947"> 1947 </option>
<option value="  1948"> 1948 </option>
<option value="  1949"> 1949 </option>
<option value="  1950"> 1950 </option>
<option value="  1951"> 1951 </option>
<option value="  1952"> 1952 </option>
<option value="  1953"> 1953 </option>
<option value="  1954"> 1954 </option>
<option value="  1955"> 1955 </option>
<option value="  1956"> 1956 </option>
<option value="  1957"> 1957 </option>
<option value="  1958"> 1958 </option>
<option value="  1959"> 1959 </option>
<option value="  1960"> 1960 </option>
<option value="  1961"> 1961 </option>
<option value="  1962"> 1962 </option>
<option value="  1963"> 1963 </option>
<option value="  1964"> 1964 </option>
<option value="  1965"> 1965 </option>
<option value="  1966"> 1966 </option>
<option value="  1967"> 1967 </option>
<option value="  1968"> 1968 </option>
<option value="  1969"> 1969 </option>
<option value="  1970"> 1970 </option>
<option value="  1971"> 1971 </option>
<option value="  1972"> 1972 </option>
<option value="  1973"> 1973 </option>
<option value="  1974"> 1974 </option>
<option value="  1975"> 1975 </option>
<option value="  1976"> 1976 </option>
<option value="  1977"> 1977 </option>
<option value="  1978"> 1978 </option>
<option value="  1979"> 1979 </option>
<option value="  1980"> 1980 </option>
<option value="  1981"> 1981 </option>
<option value="  1982"> 1982 </option>
<option value="  1983"> 1983 </option>
<option value="  1984"> 1984 </option>
<option value="  1985"> 1985 </option>
<option value="  1986"> 1986 </option>
<option value="  1987"> 1987 </option>
<option value="  1988"> 1988 </option>
<option value="  1989"> 1989 </option>
<option value="  1990"> 1990 </option>
<option value="  1991"> 1991 </option>
<option value="  1992"> 1992 </option>
<option value="  1993"> 1993 </option>
<option value="  1994"> 1994 </option>
<option value="  1995"> 1995 </option>
<option value="  1996"> 1996 </option>
<option value="  1997"> 1997 </option>
<option value="  1998"> 1998 </option>
<option value="  1999"> 1999 </option>
<option value="  2000"> 2000 </option>
<option value="  2001"> 2001 </option>
<option value="  2002"> 2002 </option>
<option value="  2003"> 2003 </option>
<option value="  2004"> 2004 </option>
<option value="  2005"> 2005 </option>
<option value="  2006"> 2006 </option>
<option value="  2007"> 2007 </option>
</select>
</div>
</div>
</div>
</div>
<div class="reservering_chrono">
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>Waar kent u ons van?</label>
<div class="box_chrono">
<select name="referentie" id="referentie">
<option selected="selected">Maak hier uw keuze</option>
<option value="Vrienden, kennissen of familie">Vrienden, kennissen of familie</option>
<option value="Google">Google</option>
<option value="Andere zoekmachine">Andere zoekmachine</option>
<option value="Advertentie krant, weekblad">Advertentie krant, weekblad</option>
<option value="Straat reclame, billboard, etc.">Straat reclame, billboard, abri, etc.</option>
<option value="Huis aan huis blad">Huis aan huis blad</option>
<option value="Anders">Anders</option>
</select>
</div></div>
</div>
<div class="box_chrono_groep">
<div class="naast_chrono">
<label >Heeft u iets 'anders' ingevuld, graag hier uw antwoord </label>
<div class="box_chrono">
<input name="anders" type="text" id="anders" size="47" maxlength="50" />
</div>
</div>
</div>

</div>
<div class="reservering_chrono">
       <div class="box_chrono_groep">
<div class="beginnaast_chrono">

<label>
Vul hier de code (spam beveiliging)</label>

{imageverification} </div>
</div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<label>E-mail adres ter controle*</label>
<div class="box_chrono">
<input name="emailtwo" type="text" id="email2" size="40" maxlength="100">
</div>
</div>
</div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<input name="voorwaarden" type="checkbox" onClick="akkoord(this)" value="akkoord">
Ik ga akkoord met deze <a href="http://www.saunasalland.nl/index2.php?option=com_content&task=view&id=72" target="_blank">voorwaarden</a></div>
   </div>
<div class="box_chrono_groep">
<div class="beginnaast_chrono">
<input name="verzenden" type="Submit" disabled id="verzenden" value="Verzenden">
<input name="annuleren" type="reset" id="annuleren" value="Annuleren"/>
<script type="text/javascript">
window.document.forms.ChronoContact_res.voorwaarden.checked=false;</script>
</div>
</div>
</div>
<div id="spacer"></div> </div>


Post edited by: shd, at: 2007/10/29 14:05

Post edited by: shd, at: 2007/10/29 14:06

Post edited by: shd, at: 2007/10/29 14:06

Post edited by: shd, at: 2007/10/29 14:07

Post edited by: shd, at: 2007/10/29 14:09<br><br>Post edited by: admin, at: 2007/10/29 16:20
admin 27
October 29 2007, 20:22 #3182
Hi shd,

#1- sorry, there was a problem with the installer, I repackaged it and its available at the downloads now!!

#2- inside any field value attribute please put this PHP code :


<?php echo $_POST['field_name']; ?>


Cheers

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
S
shd 58
October 29 2007, 22:59 #3192
Hi,

It is now working but only for the input field not for the select field.:)

What I'm doing wrong?
My code for the select field is:

<div class="box_chrono"> 
<select name="reserveren" id="reserveren" value=<?php echo $_POST['reserveren']; ?>>
<option value="Uw keuze">Maak hier uw keuze</option>
<option value="Dag bezoek sauna, 9.00-23.30">Dag bezoek sauna faciliteiten, 9.00-23.30</option>
<option value="Avond bezoek sauna, 17.30-23.30">Avond bezoek sauna faciliteiten, 17.30-23.30</option>
<option value="Salland arrangement, vanaf 10.00">Salland arrangement, vanaf 10.00</option>
</select><span class="hint">U dient minimaal een sauna bezoek of arrangement te boeken om verder te gaan. (Bij alle arrangementen zijn de sauna faciliteiten inbegrepen).</span> </div>


Groetjes,
Stephanie

ps. the new Mambot is working!!:P<br><br>Post edited by: admin, at: 2007/10/29 21:05
admin 27
October 30 2007, 01:07 #3197
Thanks Stephanie

Please take alook at this post to see how selects should be treated :

http://www.chronoengine.com/component/option,com_fireboard/Itemid,37/func,view/id,386/catid,2/limit,6/limitstart,12/

Cheers

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
S
shd 58
October 30 2007, 17:23 #3208
Hi,

Last question, I hope.;)

Only the code for the check box is not working.
<input type="checkbox" <?php if($_POST['fieldname'])echo 'checked'; ?>

Is it possible to make an example for my code??

my code is:
<input name="voorwaarden" type="checkbox" onClick="akkoord(this)" value="akkoord">


Th rest of the form works perfect.Great!

Thanks for the quick response!

Stephanie

Post edited by: shd, at: 2007/10/30 14:31<br><br>Post edited by: admin, at: 2007/10/30 15:36
admin 27
October 30 2007, 19:37 #3215
Hi Stephanie,

Please try :


<input name="voorwaarden" type="checkbox" onClick="akkoord(this)" <?php if($_POST['voorwaarden'])echo 'checked'; ?> value="akkoord">


This doesnt work ?
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
S
shd 58
October 30 2007, 20:11 #3217
HI,

It is not working. I think the javascript is doing that.

But it is not a problem. I will keep it on this way. People must check it again when they put a wrong code. That is not a problem because they can't submit the form when it is not checked, the javascript is doing that.
The rest is working perfect!!!

Thanks for all your help and quick response.

Stephanie
admin 27
October 30 2007, 20:13 #3219
Thanks Stephanie, Glad this helps

Sincerely,

Max
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!