Autocomplete Question

I have an autocomplete form field that works wonderfully. It currently pulls the suggestions nicely from the database as it should.

However it only allows input of what is in the database. Is there a way to add a static value as an option?

For example, my autocomplete field draws from a list of names. I would like to add the option of ‘None’ to the field as a static value. Much the same way drop down menus have a mixture of dynamic and static values.

Is leaving the field blank my only option?

1 Like

Seems leaving an autocomplete field blank isn't an option. Even though I don't have it set as required in the validation it won't submit unless there is a value there. You can't leave an autocomplete field blank?

@brad,

What I did was added a ‘None’ or ‘N/A’ option in my table and then added a help text below the text field explaining to type in ‘None’ or ‘N/A’ if there are no results found.

Additionally, depending on which table I’m utilizing, I sometimes add a paragraph below the text field with a link to a modal to add an entry into the table.

I hope that helps.

2 Likes