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

How to configure optgroup label

 
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
juggernautsei
Smarty n00b


Joined: 31 Aug 2016
Posts: 2

PostPosted: Fri Sep 02, 2016 3:03 pm    Post subject: How to configure optgroup label Reply with quote

I am working inside an opensource project OpenEMR.
In the pharmacy section where I am working. I wanted to add to the list of pharmacies from a different table. So I did a push array into the first array to add the other pharmacies. Now on template side this line creates the dropdown

{html_options name="pharmacy_id" options=$prescription->pharmacy->utility_pharmacy_array() selected=$prescription->pharmacy->get_id()}

And because I have the pushed the array into the first array, the line above now adds

<optgroup label="294">.....</optgroup> the pushed list of pharmacies.

Which I find OK but the 294 label shows up on the screen. Is there a way to set the optgroup label.

Thanks!
Back to top
View user's profile Send private message
elpmis
Smarty Elite


Joined: 07 Jun 2007
Posts: 321

PostPosted: Sun Sep 04, 2016 7:18 pm    Post subject: Reply with quote

http://www.smarty.net/docs/en/language.function.html.options.tpl

Think the last example shows the way...
Back to top
View user's profile Send private message
juggernautsei
Smarty n00b


Joined: 31 Aug 2016
Posts: 2

PostPosted: Wed Sep 14, 2016 1:28 pm    Post subject: Reply with quote

I went a different route and did a UNION in the query and that fixed my issue
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