Loading ...
Sorry, an error occurred while loading the content.

Help with it was not defined a valid input value error message

Expand Messages
  • Frank L. Parks
    Good Afternoon, I am getting the following error message: help_type: it was not defined a valid input value Here is a copy of the code I m using:
    Message 1 of 4 , Mar 9, 2006
    • 0 Attachment
      Good Afternoon,

      I am getting the following error message:

      help_type: it was not defined a valid input value

      Here is a copy of the code I'm using:

      $helpcriteria->AddInput(array(
      "TYPE"=>"select",
      "NAME"=>"help_type",
      "ID"=>"help_type",
      "LABEL"=>"<u>H</u>elp Type",
      "VALUE"=>$first,
      "OPTIONS"=>array($helptype),
      "LABEL"=>"Help <u>T</u>ype",
      "ACCESSKEY"=>"T"
      ));

      The value of $first is: 5

      and the value of $helptype is:
      5=>"CRAP",1=>"FIELD",2=>"SCRIPT",4=>"SYSTEM",3=>"USER"

      I extracted the values from a postgresql database and built the variables.

      I'm confused. I don't see anything wrong. I have also set the numeric
      values to string by adding "" around them.

      Thanks in advance for the help.

      Sincerely,

      Frank
    • Manuel Lemos
      Hello, ... If $helptype is an array, it should be like this: OPTIONS = $helptype, -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer
      Message 2 of 4 , Mar 9, 2006
      • 0 Attachment
        Hello,

        on 03/09/2006 06:44 PM Frank L. Parks said the following:
        > I am getting the following error message:
        >
        > help_type: it was not defined a valid input value
        >
        > Here is a copy of the code I'm using:
        >
        > $helpcriteria->AddInput(array(
        > "TYPE"=>"select",
        > "NAME"=>"help_type",
        > "ID"=>"help_type",
        > "LABEL"=>"<u>H</u>elp Type",
        > "VALUE"=>$first,
        > "OPTIONS"=>array($helptype),

        If $helptype is an array, it should be like this:

        "OPTIONS"=>$helptype,

        --

        Regards,
        Manuel Lemos

        Metastorage - Data object relational mapping layer generator
        http://www.metastorage.net/

        PHP Classes - Free ready to use OOP components written in PHP
        http://www.phpclasses.org/
      • Frank L. Parks
        Manuel, Sorry for top posting. I built the variable $helptype as a variable, not an array. I was just trying to place the results between the brackets like
        Message 3 of 4 , Mar 9, 2006
        • 0 Attachment
          Manuel,

          Sorry for top posting. I built the variable $helptype as a variable,
          not an array. I was just trying to place the results between the
          brackets like the examples.

          Since it isn't in an array, I now het the following message:

          help_type: it was not defined a valid options array

          Please help. I'm confused with arrays.

          Frank
          Manuel Lemos wrote:

          >Hello,
          >
          >on 03/09/2006 06:44 PM Frank L. Parks said the following:
          >
          >
          >>I am getting the following error message:
          >>
          >>help_type: it was not defined a valid input value
          >>
          >>Here is a copy of the code I'm using:
          >>
          >> $helpcriteria->AddInput(array(
          >> "TYPE"=>"select",
          >> "NAME"=>"help_type",
          >> "ID"=>"help_type",
          >> "LABEL"=>"<u>H</u>elp Type",
          >> "VALUE"=>$first,
          >> "OPTIONS"=>array($helptype),
          >>
          >>
          >
          >If $helptype is an array, it should be like this:
          >
          > "OPTIONS"=>$helptype,
          >
          >
          >
        • Manuel Lemos
          Hello, ... Please take a look at the test_form.php example. You should have something like this: $value = unknown ; $options = array( unknown = Unknown ,
          Message 4 of 4 , Mar 9, 2006
          • 0 Attachment
            Hello,

            on 03/09/2006 08:09 PM Frank L. Parks said the following:
            > Sorry for top posting. I built the variable $helptype as a variable,
            > not an array. I was just trying to place the results between the
            > brackets like the examples.
            >
            > Since it isn't in an array, I now het the following message:
            >
            > help_type: it was not defined a valid options array
            >
            > Please help. I'm confused with arrays.

            Please take a look at the test_form.php example. You should have
            something like this:

            $value = "unknown";
            $options = array(
            "unknown"=>"Unknown",
            "mastercard"=>"Master Card",
            "visa"=>"Visa",
            "amex"=>"American Express",
            "dinersclub"=>"Diners Club",
            "carteblanche"=>"Carte Blanche",
            "discover"=>"Discover",
            "enroute"=>"enRoute",
            "jcb"=>"JCB"
            );


            Then you call AddInput with these parameters:

            "VALUE"=>$value,
            "OPTIONS"=>$options

            If it returns an error, it is because you are not setting the options or
            the value correctly. In that case, insert this command before calling
            AddInput and let me know what it prints, so I can tell you what is wrong:

            var_dump($value, $options) ;

            --

            Regards,
            Manuel Lemos

            Metastorage - Data object relational mapping layer generator
            http://www.metastorage.net/

            PHP Classes - Free ready to use OOP components written in PHP
            http://www.phpclasses.org/
          Your message has been successfully submitted and would be delivered to recipients shortly.