Appnitro Software Forums » MachForm

Drop Down List Limit??

(4 posts)

  1. Is there a limit to the number of drop down items that can be in a list?

    I have a list of 300 items in one field (literally the numbers 1-300). After 255 it changes every choice to 255. Meaning if I choose 291 it saves it as 255 in both the entries dbase and within myPHPadmin.

    I'm having to change the whole menu to a simple text box where a number may be entered but it sort of defeats the purpose of eliminating typing.

    Any thoughts?

    Posted 2 months ago #
  2. Hmm.. that's odd. MachForm doesn't have any limit on this.

    Are those 300 items displayed correctly on the form itself?
    So the error only happened in the entries dbase and phpmyadmin?

    Posted 2 months ago #
  3. Yes, it was REALLY odd. I ended up deleting all the choices and making that field a text box for fill in simply because I was in the middle of using the form. Here's exactly how things happened:

    All 300 entries appeared in the pull down menu.

    After filling out the form, the user is taken to a confirmation page prior to actually submitting the form (thank Heavens for that added feature!) and that was where we first found choices over 255 were "changed" to either 255 or 249.

    First I went into the entries dbase to try to edit individual records---the edits would not save.

    Then I went into phpmyadmin to see if I could manually change things there and even there the edits would not take. I would edit a "changed" choice to the higher/correct number, save it, and it would be changed BACK to the lower, incorrect number.

    It was simply the strangest thing I have ever encountered.

    Posted 2 months ago #
  4. Oh.. I think you just found a bug with the dropdown!

    Apparently, the dropdown is having a maximum 255 items (when submitted).
    The bug is due to the datatype being used to store your dropdown is TINYINT, which has a maximum value 255.

    To fix this bug, edit your ap_form_x table. Search for your dropdown field, it should have fieldtype tinyint(6) unsigned.

    Change it to int.

    Then, modify your save.php file, around line 431 - 465, search for the word tinyint and replace it with int.

    That should extend the maximum items of your dropdown.

    Thank you for reporting this!

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.