News:

Support the VirtueMart project and become a member

Main Menu

Adding Custom Shopper Field that shows "--Select--" by default

Started by oasisillusions, April 26, 2022, 00:31:11 AM

Previous topic - Next topic

oasisillusions

I've been using this setup for enough years by this point that I'm honestly having trouble remembering what is connected to what and which plug-ins are controlling which items. But basically I've created a new custom drop-down field in the Shopper Fields configuration that asks customers to indicate via choosing one of the selections in the menu how they heard about our business, and I wanted to set it as a required field. However, I can't for the life of me remember how to set it up so that, by default, the drop-down says "--Select--" and prompts users to click the drop-down and choose something before moving on. Right now, as it is, I've got 10 selections in the drop-down, starting with "Returning Customer," and currently by default the drop-down displays "Returning Customer." So we've had it a couple times where people didn't feel like actually clicking the drop-down so they just left it on "Returning Customer" and continued with the order. But I'd rather have it display "--Select--" like some of the other fields do (such as "Country" and "State / Province") and be configured so they can't just leave it on "--Select--" but have to actually choose something from the menu.

Let me know if I need to clarify, I'm not sure if I'm making sense or not.

pinochico

- you add a new value for select on the first place
- you give it the value == 0
- and name your own language constant - etc == MY_CUSTOM_SELECT, which you then translate as "-- SELECT --" in right place (admin+frontend language for VM)
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products