cant get select2 to reload text of selection after page reloads

62 views
Skip to first unread message

ad...@digitalsweep.com

unread,
Aug 9, 2015, 12:53:59 AM8/9/15
to select2
I have select 2 working fine using a remote source to search. The problem I am facing is that when I submit the page, if it needs to reload because other data was invalid, the selected value shows the ID instead of the text. How do I change it to show the text of the selection if the page reloads?

Kevin Brown

unread,
Aug 9, 2015, 6:05:01 PM8/9/15
to select2
Usually this happens because you are using a custom template method.

What is the JavaScript that you are using to initialize Select2? And what does the HTML look like for it?

On Sun, Aug 9, 2015 at 12:53 AM <ad...@digitalsweep.com> wrote:
I have select 2 working fine using a remote source to search. The problem I am facing is that when I submit the page, if it needs to reload because other data was invalid, the selected value shows the ID instead of the text. How do I change it to show the text of the selection if the page reloads?

--
You received this message because you are subscribed to the Google Groups "select2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to select2+u...@googlegroups.com.
To post to this group, send email to sel...@googlegroups.com.
Visit this group at http://groups.google.com/group/select2.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages