We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38060
    • 29 Posts
    Description of Problem: Server returns error code 500 when passing a value to a select box.

    Steps to Reproduce:
    I have a select box to select the state. Every option holds as value the abbreviation (eg. CA) and wraps the full name (eg. California).
    All fields of the forms are getting populated using a function called with eFormOnBeforeFormParse. I can successfully pass the values to regular input fields, but when I pass the abbreviation of the state, the server returns error code 500.

    Expected Outcome:
    When loading the form, the state (eg. California) is selected based on the populating value (eg. abbreviation).


    • MODX Version: 1.07
    • PHP Version: 5.x
    • Additional Server Info: Hosted at Hostmonster
      • 38060
      • 29 Posts
      I just figured it out:

      Since select boxes allow multiple selections, the value has to be submitted in an array like this:

      $fields['state']=array('CA');

      I totally forgot about this, because I did not those select boxes with multiple selections very often.