I entered project_toolbox into my plugin's database table and created checkbox list named project_toolbox with 10 values. How can I retrieve those value if checked from the backend.
Here is what I was unable to get the value of the checkbox value
<div class="project-toolbox">
{% for toolbox in project.project_toolbox %}
<div class="{{ option.name }}"><span>{{ toolbox.name }} Hello</span></div>
{% endfor %}
</div>
You can simply iterate through array
<div class="project-toolbox">
{% for toolbox_item in project.project_toolbox %}
<div class="{{ option.name }}"><span>{{ toolbox_item }} Hello</span></div>
{% endfor %}
</div>
You can directly use string value
{{ toolbox_item }}
asproject_toolbox
is the array of strings.
if any doubt please comment.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.