J4 Issue ?
avatar superconejo
superconejo
20 Nov 2018

Steps to reproduce the issue

Joomla 4.x,
Module Backend:
Insert a field of type="combo" in any module mandatory file. For example in modules/mod_foo/mod_foo.xml.

 <field
 name="combotest"
 type="combo"
 label="combo test"
 default="opt1"
 >
 <option value="opt1">opt1</option>
 <option value="opt2">opt2</option>
 <option value="opt2">opt2</option>
 <option value="op3">opt2</option>
 <option value="opt4">opt3</option>
 </field>

Expected result

A combobox with a dropdown button to select the options.
Like in HTML Code in J3:
HTML:

<div class="controls"><div class="combobox input-append">
<input type="text" name="jform[params][combotest]" id="jform_params_combotest" value="opt1" class="combobox" autocomplete="off" aria-invalid="false" data-com.agilebits.onepassword.user-edited="yes">
<div class="btn-group">
<button type="button" class="btn dropdown-toggle">
<span class="caret"></span>
</button>
<ul class="dropdown-menu" style="width: 265px; left: -219px; max-height: 150px; overflow-y: scroll; top: -138px;">
<li><a href="#" class="">opt2</a></li>
<li><a href="#" class="">opt2</a></li>
<li><a href="#">opt2</a></li>
<li><a href="#">opt3</a></li>
</ul></div>
</div>
</div>

Actual result

Just an input field with autocomplete functionality
HTML:

<div class="controls">
<div class="awesomplete has-success"><input type="text" name="jform[params][combotest]" id="jform_params_combotest" value="opt1" class="awesomplete form-control valid form-control-success" data-list="opt1, opt2, opt2, opt2, opt3" autocomplete="off" aria-owns="awesomplete_list_1" role="combobox" data-com.agilebits.onepassword.user-edited="yes" aria-invalid="false"><ul role="listbox" id="awesomplete_list_1" hidden=""></ul><span class="visually-hidden" role="status" aria-live="assertive" aria-atomic="true" hidden="">No results found</span></div>
</div>

System information (as much as possible)

Joomla! 4.0.0-alpha5 Alpha
No need more...

Additional comments

Html code in layouts/joomla/form/field/combo.php for joomla 3.x

<div class="combobox input-append">
<input
type="text"
name="<?php echo $name; ?>"
id="<?php echo $id; ?>"
value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>"
<?php echo $attr; ?>
autocomplete="off"
/>
<div class="btn-group">
<button type="button" class="btn dropdown-toggle">
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<?php foreach ($options as $option) : ?>
<li><a href="#"><?php echo $option->text; ?></a></li>
<?php endforeach; ?>
</ul>
</div>
</div>

Html code in layouts/joomla/form/field/combo.php for joomla 4 alpha 5
Just:

<input
type="text"
name="<?php echo $name; ?>"
id="<?php echo $id; ?>"
value="<?php echo htmlspecialchars($value, ENT_COMPAT, 'UTF-8'); ?>"
<?php echo $attr; ?>
data-list="<?php echo implode(', ', $val); ?>"
/>

There is no "btn-group" coded

avatar superconejo superconejo - open - 20 Nov 2018
avatar joomla-cms-bot joomla-cms-bot - change - 20 Nov 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Nov 2018
avatar Quy Quy - change - 24 Nov 2018
Title
Formfield type="combo" has not dropdown list
[4.0] Formfield type="combo" has not dropdown list
Build staging 4.0-dev
avatar joomla-cms-bot joomla-cms-bot - edited - 24 Nov 2018
avatar Quy Quy - change - 19 Dec 2018
Status New Confirmed
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 28 Mar 2019

Added to Categorie "Fields".


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23127.

avatar franz-wohlkoenig franz-wohlkoenig - change - 28 Mar 2019
Category Fields
avatar franz-wohlkoenig franz-wohlkoenig - change - 4 Apr 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 4 Apr 2019
avatar brianteeman
brianteeman - comment - 15 Jul 2019

I believe this is the expected behaviour of the combo box in j4. It is using awesomplete and will look like this

image

avatar franz-wohlkoenig franz-wohlkoenig - change - 16 Jul 2019
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2019-07-16 03:49:30
Closed_By franz-wohlkoenig
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 16 Jul 2019

Closed as expected Behaviour. Please reopen if needed.

avatar franz-wohlkoenig franz-wohlkoenig - close - 16 Jul 2019

Add a Comment

Login with GitHub to post a comment