Hello !
I'm not very good at coding so i need your support.
There are some "Custom fields" that seller can choose from a list
Here is the beginning of the code :
{% if mp_allowproducttabs['custom-field'] is defined %}
<div id="tab-custom-field" class="tab-pane tab-content">
<div id="tab-custom-field" >
<div class="row">
<div class="col-sm-3">
<ul class="nav nav-pills nav-stacked" id="vtab-option">
{% set tabCount = 0 %}
{% set wkcustom_option_row = 0 %}
{% if wkPreCustomFields is not empty %}
{% for tabs in wkPreCustomFields %}
<li>
<a href="#wktab-option-{{ tabCount}}" data-toggle="tab" id="wkoption-{{ tabCount}}" field-id = "wkoption-{{ tabs['fieldId']}}"><i class="fa fa-minus-circle" onclick="$('#wkoption-{{ tabCount}}').remove(); $('#wktab-option-{{ tabCount}}').remove(); $('#vtab-option li a:first').trigger('click'); return false;"></i>{{ tabs["fieldName"]}}</a>
</li>
{% set tabCount = tabCount + 1 %}
{% endfor %}
{% endif %}
<li id="optionSelector">
<select name="wkcustomfield" class="form-control" style="min-width:100px;">
{% if wkcustomFields is not empty %}
<option value=""></option>
{% for field in wkcustomFields %}
<option value="{{ field['id']}}" data-type = "{{ field['fieldType']}}" data-name="{{ field['fieldName']}}" data-des="{{ field['fieldDescription']}}" data-text="{{ field['fieldDescription']}}" data-isRequired = "{{ field['isRequired']}}">
{{ field['fieldName']}}
</option>
{% endfor %}
{% endif %}
</select>
</li>
</ul>
</div>
When seller select first custom field, he can remove it by clicking or adding another one under the previous one... => See picture enclosed CF1.jpg
What i would like is seller don't have to click to choose in custom field list. i would like custom field already selected one after one .=> See picture enclosed CF2.jpg
How can i change my code to do that ?
Thank you for your help !
I'm not very good at coding so i need your support.
There are some "Custom fields" that seller can choose from a list
Here is the beginning of the code :
{% if mp_allowproducttabs['custom-field'] is defined %}
<div id="tab-custom-field" class="tab-pane tab-content">
<div id="tab-custom-field" >
<div class="row">
<div class="col-sm-3">
<ul class="nav nav-pills nav-stacked" id="vtab-option">
{% set tabCount = 0 %}
{% set wkcustom_option_row = 0 %}
{% if wkPreCustomFields is not empty %}
{% for tabs in wkPreCustomFields %}
<li>
<a href="#wktab-option-{{ tabCount}}" data-toggle="tab" id="wkoption-{{ tabCount}}" field-id = "wkoption-{{ tabs['fieldId']}}"><i class="fa fa-minus-circle" onclick="$('#wkoption-{{ tabCount}}').remove(); $('#wktab-option-{{ tabCount}}').remove(); $('#vtab-option li a:first').trigger('click'); return false;"></i>{{ tabs["fieldName"]}}</a>
</li>
{% set tabCount = tabCount + 1 %}
{% endfor %}
{% endif %}
<li id="optionSelector">
<select name="wkcustomfield" class="form-control" style="min-width:100px;">
{% if wkcustomFields is not empty %}
<option value=""></option>
{% for field in wkcustomFields %}
<option value="{{ field['id']}}" data-type = "{{ field['fieldType']}}" data-name="{{ field['fieldName']}}" data-des="{{ field['fieldDescription']}}" data-text="{{ field['fieldDescription']}}" data-isRequired = "{{ field['isRequired']}}">
{{ field['fieldName']}}
</option>
{% endfor %}
{% endif %}
</select>
</li>
</ul>
</div>
When seller select first custom field, he can remove it by clicking or adding another one under the previous one... => See picture enclosed CF1.jpg
What i would like is seller don't have to click to choose in custom field list. i would like custom field already selected one after one .=> See picture enclosed CF2.jpg
How can i change my code to do that ?
Thank you for your help !
Well, one should always mention the exact OC Version and Theme one uses,
and you seem to be using some Custom Admin Theme as well, as it looks, if
one expects a usable reply, like in every 'technical' Place on this Planet ...
Ernie
and you seem to be using some Custom Admin Theme as well, as it looks, if
one expects a usable reply, like in every 'technical' Place on this Planet ...


Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Who is online
Users browsing this forum: No registered users and 5 guests