Add the ReqText custom field to a product

The basic settings are now setup for your first ReqText field. So we’ll continue by adding the ReqText field to a product:

  1. Select Products in the VirtueMart Menu (man products at the left of your page).
  2. In the product overview select the product where you want to use the ReqText field. Select the product by clicking the Product Name. Assuming you've already entered all the correct information for your product, you'll have to click the Custom Fields tab.
  3. Near the Custom Field Type title you see a dropdown list. Click on it to open it and select your newly created ReqText custom field by it's name. In our example it's called ReqText Sample.

Now the ReqText settings are displayed beneath the dropdown list. Or, if you have already selected several custom fields, it's below the last custom field at the bottom of the page.
Let's see what options are possible in our example:

man textinput

  1. You can set the Text input field to be required (or not) for this product. If you leave this option set to ‘No’ your customers can always order a product even if they leave the input field empty.

  2. This is the hint which is displayed when the user needs to fill in the custom field. It is multi-lingual aware and by default it shows “Required Field”.

  3. This option can restrict the number of characters a customer can enter in the input field. When set to 0 or left blank no limit is set.

  4. Here you can set the width of the input field. If you leave it empty (or set it to null) the default width is used (defined in template CSS or browser default).

  5. This feature allows you to set limitations to the input a user can enter. It is checked by a jQuery script when the user starts typing and before the result is saved into the cart.

Click man save&close to store the custom field settings for this product. Open the frontend of your webshop and browse to the product you have just editted. Check to see if the ReqText input field is correctly added to the product. You can test it by adding the product using man addtocart.