We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26482
    • 138 Posts
    Hi,

    I’m trying to follow this topic to dynamically add a select drop down to my form.

    My template looks like this:
    <p class="error">[+validationmessage+]</p>
     
    <form method="post" action="[~[*id*]~]" id="eForm-Login">
     
    	<fieldset>
    		<h3> Aanmaken login voor toegang tot de beschermde delen van de website</h3>
     
    		<input name="formid" type="hidden" value="eForm_Create_User" />
     
    		<label for="1-groep">Groep van kind 1:<p>
                   <select id="1-groep" name="1-groep" ">
                     [+display_tv_options+]
                   </select>
             </p> </label>
    
    		<label> </label><p><input type="submit" name="create" id="cfContact" class="bucodeon" value="Verstuur gegevens" /></p>
     
    	</fieldset>
     
    </form>


    The snippet as described by TobyL works wonders and inserts the correct values in the dropdown box. However, on submicodeing, I get a blank page (nothing shown, no error message).

    I’ve tried to add the debug command. My call is:
    [GecodeVGroepen]]
    [!eForm? &formid=`eForm_Create_User` &subject=`[+subject+]` &to=`[email protected]` &ccsender=`1` &tpl=`tpl_eForm_Create_User` &report=`eForm_Create_User_Report`  &eFormOnBeforeFormParse=`eformGecodevGroepen`  &debug=`1` !]


    « MODx Debug/ stop message »
    
    The MODx parser recieved the following debug/ stop message:
    « Error in validating form field! »
     
    PHP error debug
      Error:	#LIST rule declared but no list values supplied: #LIST	 
      Error type/ Nr.:	User Warning - 512	 
      File:	/usr/local/WWW/A/.5c1/a/awubasdn/htdocs/assets/snippets/eform/eform.inc.php	 
      Line:	947	 
     
    Parser timing
      MySQL:	0.0074 s	(0 Requests)
      PHP:	0.0801 s	 
      Total:	0.0875 s
    
    


    However, I don’t have a #LIST validation in my form.

    The code around line 947 is:
    if( $isDebug && count($vlist)==1 && empty($vlist[0])  ){
    					 //if debugging bail out big time
    					 $modx->messageQuit('Error in validating form field!', '',$false,E_USER_WARNING,__FILE__,'','#LIST rule declared but no list values supplied: '.$fld[5],__LINE__);
    				}elseif(!in_array(strtolower($value),$vlist))
    					$errMsg = ($fld[2]=='file')? $_lang["ef_failed_upload"]: $_lang['ef_failed_list'];
    				break;



    Any ideas?
      • 3177
      • 137 Posts
      Helll sderuiter.

      Yes, same problem here.
      4 years later.
      Arrgghh.
      Also in TheNetherlands.
      Maybe MODX hates the Dutch?
      :-)

      Did you have a solution?
      (Probably you're long gone now...)

      Regards,

      Bert