question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pre-populate tags

See original GitHub issue

In using multiselect in tags mode is it possible to pre-populate tags with existing values when showing the control.

See https://jsfiddle.net/57okrzx2/3/ which sets the v-model value on creation but it isn’t reflected on the control

Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
RobWalkercommented, Dec 29, 2020

Perfect – thanks for the amazing support.

I look forward to seeing what you are able to do with vueform as a whole library.

1reaction
adambereczcommented, Dec 28, 2020

There are actually two ways to do that:

  • either set resolveOnLoad to true which will load all async options initially and set the value after that: https://jsfiddle.net/6ev8zugr/ (I needed to tweak fetchLanguages in the example so that it works with an empty query)
  • or you can set object to true and provide value as an object, like [{value:'Alice',label:'Alice'}]: https://jsfiddle.net/6ev8zugr/1/

The first solution is more convenient to use in a forms when the values are being saved and loaded and has relatively few options. The second should be used for searches and autocomplete, when the values doesn’t actually get saved or loaded but can have large amount results.

The second solution needs an update to 1.2.2, because there was an issue with loading initial value (should work in the jsfiddle example though).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pre-Populating Form Fields with Personalization Tags
When preparing to personalize, you should be mindful of two pieces of information: The form field you'd like to pre-populate; That form field's...
Read more >
Merge Tags - Pre-populate Form Fields
When a merge tag includes a fallback value, this value is used to pre-populate the form field in the event that there is...
Read more >
How to Pre-Populate Data in Your Forms - Digioh Help Docs
With merge tags, you can display previously-captured data on your forms. This data is stored client-side in localStorage. Merge tags can be used ......
Read more >
Topic Tag: prepopulate - WordPress.org
Topic Tag: prepopulate · [Forminator - Contact Form, Payment Form & Custom Form Builder] No spaces when using Query Parameters to Pre-populate. Started...
Read more >
How To Pre-Populate Data in Your Forms - YouTube
If you have multiple forms on your site, you can increase conversions by using our pre-populate data feature to stop collecting the same ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found