Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

datalist with smarty

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
brokedev
Smarty n00b


Joined: 06 Dec 2016
Posts: 3

PostPosted: Thu May 18, 2017 7:45 pm    Post subject: datalist with smarty Reply with quote

hey i want to make a dropdown list with datalist with smarty but i don't know i mean i want this:

<label>Choose a browser from this list:
<input list="browsers" name="myBrowser" /></label>
<datalist id="browsers">
<option value="Chrome">
<option value="Firefox">
<option value="Internet Explorer">
<option value="Opera">
<option value="Safari">
<option value="Microsoft Edge">
</datalist>

like this:

{html_options name=foo options=$myOptions selected=$mySelect}

output this:

<select name="foo">
<option label="Joe Schmoe" value="1800">Joe Schmoe</option>
<option label="Jack Smith" value="9904" selected="selected">Jack Smith</option>
<option label="Charlie Brown" value="2003">Charlie Brown</option>
</select>
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Thu May 18, 2017 8:37 pm    Post subject: Reply with quote

Well, what's holding you up?
You want it? Go ahead and write it.
Do keep in mind, though, that this tag has limited support across browsers.
Back to top
View user's profile Send private message
brokedev
Smarty n00b


Joined: 06 Dec 2016
Posts: 3

PostPosted: Tue May 23, 2017 7:44 pm    Post subject: Reply with quote

AnrDaemon wrote:
Well, what's holding you up?
You want it? Go ahead and write it.
Do keep in mind, though, that this tag has limited support across browsers.


What's holding me?

I don't know if smarty manage datalist not a select.

i don't want a select i want a datalist its the same process?
Back to top
View user's profile Send private message
AnrDaemon
Administrator


Joined: 03 Dec 2012
Posts: 1785

PostPosted: Tue May 23, 2017 11:57 pm    Post subject: Reply with quote

1. Yes, same process. You write a plugin and use it to render your data.
2. https://caniuse.com/#search=datalist
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP