Dropdown Menu with OPTGROUP

11 years 7 months ago #210790 by rosshennessy
Dropdown Menu with OPTGROUP was created by rosshennessy
Hi,

Using Joomla 2.5.6 and CB 1.8.1.

How can I have a dropdown menu with OPTGROUP.

Thanks

Please Log in to join the conversation.

11 years 7 months ago #210806 by nant
Replied by nant on topic Re: Dropdown Menu with OPTGROUP

rosshennessy wrote: Hi,

Using Joomla 2.5.6 and CB 1.8.1.

How can I have a dropdown menu with OPTGROUP.

Thanks


I do not understand - what do you mean with OPTGROUP ?

Please Log in to join the conversation.

11 years 7 months ago #210848 by krileon
Replied by krileon on topic Re: Dropdown Menu with OPTGROUP
CB dropdown fieldtypes have no feature to add optgroups (something for a future release). This can only be done through API or raw HTML.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

11 years 7 months ago #210849 by rosshennessy
Replied by rosshennessy on topic Re: Dropdown Menu with OPTGROUP
<select id="state" name="state">
<option selected="selected" value="">Please Select</option>
<optgroup label="Ireland">
<option value="CAR">Carlow</option>
<option value="CAV">Cavan</option>
<option value="CLA">Clare</option>
<option value="COR">Cork</option>
<option value="DON">Donegal</option>
<option value="DUB">Dublin</option>
<option value="GAL">Galway</option>
<option value="KER">Kerry</option>
<option value="KID">Kildare</option>
<option value="KIK">Kilkenny</option>
<option value="LEX">Laois</option>
<option value="LET">Leitrim</option>
<option value="LIM">Limerick</option>
<option value="LOG">Longford</option>
<option value="LOU">Louth</option>
<option value="MAY">Mayo</option>
<option value="MEA">Meath</option>
<option value="MOG">Monaghan</option>
<option value="OFF">Offaly</option>
<option value="ROS">Roscommon</option>
<option value="SLI">Sligo</option>
<option value="TIP">Tipperary</option>
<option value="WAT">Waterford</option>
<option value="WEM">Westmeath</option>
<option value="WEX">Wexford</option>
<option value="WIC">Wicklow</option>
</optgroup>
<optgroup label="Northern Ireland">
<option value="ANT">Antrim</option>
<option value="ARM">Armagh</option>
<option value="LDY">Derry</option>
<option value="DOW">Down</option>
<option value="FER">Fermanagh</option>
<option value="TYR">Tyrone</option>
</optgroup>
</select>

Please Log in to join the conversation.

11 years 7 months ago #210857 by rosshennessy
Replied by rosshennessy on topic Re: Dropdown Menu with OPTGROUP
Hi Krileon,

How can this be done through API or raw HTML.

Please Log in to join the conversation.

11 years 7 months ago - 11 years 7 months ago #210865 by krileon
Replied by krileon on topic Re: Dropdown Menu with OPTGROUP
You'd need to write a new plugin, probably fieldtype plugin if you want it as a field. You'd then need to review moscomprofilerHTML usage in comprofiler.class.php (see various plugins as most are using it somewhere). For example see GroupJives admin.cbgroupjive.php and find the showConfig function and you'll see how it constructs a dropdown select array.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.210 seconds

Facebook Twitter LinkedIn