canton
Total posts: 76
15 Sep 2012 15:45

Within Field plugin Select in params "First element of select" is set to "Independence" and the "List values from SQL query" param is set to "Yes" which also has a "SQL query" in the SQL query box.

The Problem is the field won't show to the public if the default "First element of select" is chosen on the front end even though the param General Properties>Show full is set to yes.

It seems the field will only show if you choose from the list that was pulled from the database "SQL query" and not if the "First element of select" is selected, which in this case is always the default (at the top of the list).

I hope this makes sense

Please advise how to work around this.

Last Modified: 02 Mar 2014


Guest
16 Sep 2012 00:15

Yes, the first value isn`t shown at all. Perhaps the deal is in the template?


canton
Total posts: 76
17 Sep 2012 00:45

but the first value should be shown because this is supposed to be the default text value if others are not chosen.

Please advise


Sergey
Total posts: 13,748
18 Sep 2012 08:24

"First element of select" is set to "Independence"

This is only to change text of the first element. But it has not value. So if you chose it you actually havent chosen anything.

If you want any value you have to edit field template and add option there.

<select name="jform[fields][<?php echo $this->id;?>]" class="elements-list" id="form_field_list_<?php echo $this->id;?>" <?php echo $required . $style;?>>

    <option value="0"><?php echo JText::_($this->params->get('params.label', 'S_CHOOSEVALUE'));?></option>

    <option value="Independence">Independence</option>

But do тещ forget to change first element to something like - Select This -

Powered by Cobalt