Is it possible to have a "Create new" option in a dropdown

Hey all- I’m new here so apologies if this has been covered…

I have a form where users can add books to their library. One of the form fields is “author”, which is currently a dropdown with values that pull from the “authors” table based on the selected genre. However, I want to also offer the option to add a new author while adding a book.

Is there any way to do this? One thought is to have a separate input field that would only be visible if the dropdown is empty, but this seems kind of clunky. I know I’ve seen plenty of dropdowns where the last option is “create new” or something like that, but not sure if that’s possible in Adalo.

Thanks for any help!

Hi Max,

Welcome to the community :partying_face:

You could have a record in the Authors Table like Create New Author and you can add it first and then you can sort the drop down by the Created Date - Newest to Oldest or you can create a number property like ID and sort it based on that.

And then you can add another button that will link to another screen like a Modal screen and in there you can add a form to add a author and you can make the button visibility only if Other Components>drop down>name>is equal to>Create a new author. For make this easier you can make the condition as Other Components>drop down>ID>is equal to>1 ( the ID that assigned to that Create a new author record )

Made a quick video :

Thank you

2 Likes

Hey Dilon thanks for this! I think this will work. I’m wondering if I could even take it one step further and have the modal come up as soon as the user clicks “create new author”, rather than having them click the option in the dropdown and then click the create new button. I’ll play around with it.

Really appreciate the help!

Your Welcome!

Unfortunately, still there is no way to add a action to the drop down. But for a workaround you could add a Countdown component and add a action that links to the Modal screen and add a visibility condition that visible only when the drop down selected author>ID is equal to>1 or Name >is equal to>Create New Author.

And also Visual Dev Studio made a component called Select box that we can add actions. Maybe that can also help you!

See here in the Paid Tab :

Thank you

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.