Post by PMAGO » Fri Nov 06, 2020 3:43 am

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 !

Attachments

CF2.jpg

CF2.jpg (40.37 KiB) Viewed 631 times

CF1.jpg

CF1.jpg (113.87 KiB) Viewed 631 times


Newbie

Posts

Joined
Wed Oct 16, 2019 11:20 pm

Post by IP_CAM » Fri Nov 06, 2020 4:20 am

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 ... :D ;)
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.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by PMAGO » Fri Nov 06, 2020 4:56 am

Not very familiar with that, sorry.
My OC version : 3.0.3.6 + Multi vendor marketplace module + Journal 3 theme

Newbie

Posts

Joined
Wed Oct 16, 2019 11:20 pm

Post by straightlight » Fri Nov 06, 2020 5:06 am

PMAGO wrote:
Fri Nov 06, 2020 4:56 am
Not very familiar with that, sorry.
My OC version : 3.0.3.6 + Multi vendor marketplace module + Journal 3 theme
Unsupported.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by paulfeakins » Fri Nov 06, 2020 5:40 pm

PMAGO wrote:
Fri Nov 06, 2020 4:56 am
My OC version : 3.0.3.6 + Multi vendor marketplace module + Journal 3 theme
https://support.journal-theme.com/

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 5 guests