Support the ongoing development of Laravel.io →
Requests Input Forms
Last updated 2 years ago.
0

Evertything depends on typehead you're using.

Usually typehead or autocomplete objects allow to list:

  • simple strings value and label are the same thing;
  • array of objects with label and value properties.

So if you use a list of objects instead of simple strings typehead should separate readable value from submitted one.

Some typehead allow to handle events at the end of fetching data. So if your script detect that element inserted by user doesn't exist, via ajax, you can insert it (after user consent it) and re-run fetching to retrieve last element created.

Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

stankobrin stankobrin Joined 20 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.