Skip Navigation

[Resolved] Allowing 'cred_generic_field' to have multiple values

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 4 replies, has 2 voices.

Last updated by MattI4840 7 months ago.

Assigned support staff: Luo Yang.


I am trying to:

I've created a form to allow users to create estimates. I've created a view that displays all of the products and services stored in the woocommerce products post type. I'd like users to be able to add multiple line items to the estimate form.

I've created a custom field for this that has the "Allow multiple instances of this field" option checked, and I'm using a cred generic field to display the options. Is there any way for a cred_generic_field to have the "Add New" button under it in the form as other single line fields can do?

Here is what the code for this generic field looks like so far:

<div class="row">
  <div class="col-sm-6"><label>Line Item</label>
      [cred_generic_field type='select' field='estimate-line-item' class='form-control' output='bootstrap' select_text='--- not set ---']
      "options":[wpv-view name="list-rep-line-items"]

Not the view works fine, it populates the drop down as expected. I'm currently attempting to duplicate the behavior by looking at single line fields that do allow multiple instances, and replicating the button and code that allows this, but thus far I've been unsuccessful.

Any help you can provide would be greatly appreciated.



Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)


The cred_generic_field shortcode supports two kinds of multiple choices fields:
- checkboxes
- multiselect
See our document:

And you will need to use action hook cred_save_data to save the user submitted values into your database as repeating field.

More help:



I'm confused by your answer, you said generic fields only support two types of multiple choice fields, and link to the documentation, but nowhere in the documentation does it say that is the case. This is just an observation as I don't need a multiple choice field in this instance, there will be far too many options in the list to do a multi-select or checkboxes field.

What I really need is a select field that allows for multiple instances of the field to be added to the post form, or a work around so I can create something close to that. I'm also open to other options that you think may be suitable for this use case as I'm sure it's not the first time someone has needed to create an estimate module with line items.



Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I assume you are going to setup multiple instance generic field in Toolset form, if it is, there isn't such kind of built-in feature within Toolset Forms plugin, you can add a feature request for it:


Thanks for looking into this for me Lou!