REMINDER

Please be respectful of all AppDragers! Keep it really civil so that we can make the AppDrag community of builders as embracing, positive and inspiring as possible.

Admin VS front-end input inconsistencies...



  • In the admin, the database editor saves "Dropdown multi" type as ["value","value2"]

    But in the front-end, the Cloud backend form input "Multidropdown" saves the values as value,value2.

    The admin type:
    Image 2020-10-12 at 3.29.41 PM.png

    Input form on front-page:
    Image 2020-10-12 at 3.31.15 PM.png

    In the database it looks like:

    Image 2020-10-12 at 3.32.32 PM.png

    First one created with input form, second created inside the admin editor.

    How to make it consistent?...



  • Hum, I wouldn't say the form input you're using is initially specifically targeting this type of column but I agree that it would be great to have it consistent.

    What do you think if we add an option on the field to determine if it saves it "value, value2, value3, ..." or ["value", "value2", ...]?



  • @Wassim Such an option would be perfect! Covers all bases.

    How quickly can you add it? We need to launch yesterday...



  • I can't promise to do it before end of next week because many other points are before in our task list.

    If you already need it to save it this way it's pretty easy:

    1 - Switch your source type from field to formula

    d900345e-240e-4d90-8124-fce99aa6282e-image.png

    2 - Replace searchableList by your input name and use this code in the formula

    JSON.stringify($("select[name='searchableList']").val())
    

    3 - Your data will be sent the way you expected

    ad2362c8-134c-494f-9889-9e32891024bf-image.png



  • @Wassim said in Admin VS front-end input inconsistencies...:

    JSON.stringify($("select[name='searchableList']").val())

    Thanks a lot for the workaround, works as expected!
    Plus gave me some new ideas, neat the we can do formulas there, didn't even notice!

    I love that there are these hidden gems in Appdrag 🦆


Log in to reply