optgroup in dropdown and template help

alisamii

Member
I need some help regarding developing sub-categories (for lack of a better way to call them) in drop-down menus. A site I am working on for a UN based organisation needs a registration form for a conference they will be holding in February 2014. The form needs a drop-down where the end-user/registrant selects their organisation from a list of about 100 organisations.

Basically, there are 4 types of organisations, and based on the organisation type, different options are enabled/disabled in the remainder of the form.

The basic structure is:

Non-Partner Organisations (2 options)
Partner Organisations (85 options)
Steering Committee Member Organisations (12 options)
Special Invitees (1 option)

I was developing the form originally with Seblod, but I found the interface lacking, and the feature-set limiting, especially in terms of developing an end-user administrative interface that would make the management of the form submissions simple for the client. It is too "technical".

However, with Seblod, I was able to use "optgroup=partners", for example, to group the 85 Partner organisations together. The resulting drop-down menu then grouped each item under the optgroup and thus allowed me to quickly assign visibility and conditional rules to be applied to all members of that optgroup.

For example, Partners and Steering Committee Members can upload a file, Non-Partners and Special Invitees cannot. Steering Committee Members can register to attend all 4 sessions, partners can attend 3 of the 4 sessions, special invitees 2 of the 4 sessions, etc.

See this screenshot: http://d.pr/i/FK6l

I have not been able to find a way to implement this in Fabrik, and it is a deal-breaker if this is not possible.

On another note, I am having a more fundamental problem with templates. I spent all weekend and today trying to get custom templates to work on Fabrik. Laying them out isn't a problem, but the submit button doesn't work, I've even tried it with example ones from the forum and none of them work either.

FYI, my environment is:

Joomla 3.2
Gantry Framework Default Template (4.1.18)
Latest version of Fabrik (waiting for the 3.2 compatible version).

Can you assist?

Thanks,

Ali
 
If I am not mistaken, the cascading dropdown element is intended for situations like choosing a state in one dropdown and then a new dropdown would show up and I could then select cities.

That isn't what I need.

What I need is to be able to group multiple elements within the same dropdown under a optgroup.

If you look at the screenshot available here: http://d.pr/i/FK6l you will see what I need to do.

In that screenshot, you can see a single dropdown menu. It has two optgroups, "Non Partners" and "Partners & Steering Committee". These are like headings in the dropdown. An optgroup also allows all sub-items to be able to be grouped together. This has multiple benefits. Most importantly for my purposes, I can define javascript calls to execute visibility changes in the form based on an optgroup.

If my dropdown menu only had 10 items, it would be simple to just associate each item with certain calls. But when I have close to 100 items, or even more in certain cases, that becomes less efficient. However, if the items can be grouped together, then I can write a more efficient code.

Am I more clear in my description?
 
I think that the dbjoin "Advanced" "Eval Options" is overkill. An optgroup is quite a standard dropdown element and is a known specification in html markup.

http://www.w3schools.com/tags/tag_optgroup.asp

The generated code is like this:

HTML:
<select>
    <optgroup label="Swedish Cars">
        <option value="volvo">Volvo</option>
        <option value="saab">Saab</option>
    </optgroup>
    <optgroup label="German Cars">
        <option value="mercedes">Mercedes</option>
        <option value="audi">Audi</option>
    </optgroup>
</select>

I am surprised that the dropdown element does not support optgroups directly. Perhaps I am unaware of the support and how to use it, but I have noticed others have also asked about this, but I have not seen any replies.

Rob, perhaps you could shed some light on this, and how I can implement optgroups in the dropdown.

Thank you.
 
That's great, Rob, thank you very much. I am assuming I can also use eval populate to import a large list for the dropdown with <optgroup> support. Is there any special considerations I need to make when setting that up?

On another note, I am having a more fundamental problem with templates. I spent all weekend last weekend, the entire last week, and this past weekend trying to get custom templates to work on Fabrik. Laying them out isn't a problem, but the submit button doesn't work, I've even tried it with example ones from the forum and none of them work either.

How can I get submit buttons to work. Maybe I am incorrectly doing something quite simple, but I am dumbfounded at the moment.

Please advise.

Thanks.
 
import of the options should work fine although i've not tested.
No idea about your template - i'd need to see the template and the url to advise
 
Hi Rob

Thank you. I have included the url to the site under "My sites". Can you have a look at ?layout=conference and tell me why the register button is not working. There is a small section of test fields, just to create a user account in Joomla using Juser.

Ali
 
there's a js error when using the conference layout - you are missing the parent container class which should be wrapped around every element@

HTML:
<div class="<?php echo $this->element->containerClass;?>">
.... render element html here
</div>
 
Hi Rob,

That worked, for the most part.

I am having an issue where, when entering the password and then password confirmation, the validation kicks in, and then the form is stuck at that point.

The register button still does not work.

Can you advise on how to overcome this block?

Thank you,

Ali
 
Just FYI, I think your issue with posting in Pro should be resolved. Can you confirm this, and I'll move this thread to the Pro forum.

-- hugh
 
Moved to Pro.

I tried the "Registration" link on that site, I get a 404. And the login you gave us doesn't seem to be an admin, so I can't login to the backend.

-- hugh
 
Hi Hugh

Weird there was a problem with the link, but it's all sorted again now if you can take a look.

The domain is in "My sites" along with the password, which I have confirmed is working. My template is /en/register?layout=conference

Can you try again and if you have any problems send me a direct email or private message. The deadline for getting this form done is this week, so any help would be appreciated.

Thanks

Ali
 
OK, looks like you are missing the date element.

You have to include all the published elements in your template. You can hide the ones you don't want to show. But their structure has to be there, same as the visible ones, so our JS can find the DOM elements it needs to construct the data that gets submitted.

-- hugh
 
I'm having problems ftp'ing to your site with FileZilla. Looks like your sftp is only configured to accept pub/private keys.

-- hugh
 
Hi Hugh,

Yes. If you give me your public key, I will add it to the system and authorise it. Just send it to me as a private message.

Thanks,

Ali
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top