Express Association Dropdown

So I’m trying to build an auction/bid system using express. I have an auction object and a bid object. I have a form for the bid where you can choose an auction, which is setup with a one (auction) to many (bids) association. So far this is all working. However, the dropdown to choose the auction just lists the IDs of the auction items, not anything useful. How can I display something useful in that dropdown?

See if this helps

The issue is that by default, Concrete CMS uses the id field to represent objects in dropdowns when you’re working with Express entities. To make the dropdown display something more useful, such as the auction’s title or description, you need to specify a custom display attribute for your Auction Express entity.

Here’s how you can resolve this:

Step 1: Add a Display Attribute to Your Auction Entity

  1. Navigate to the Dashboard and go to System & Settings > Express > Data Objects.
  2. Select your Auction Express entity.
  3. Edit the entity and ensure it has an attribute (e.g., “Auction Title”) that you’d like to display in the dropdown. If it doesn’t already exist, create it as a text attribute and populate it for each auction.

Step 2: Set the Attribute as the Display Name

  1. Go back to the Express > Data Objects menu and select your Auction entity again.
  2. In the entity settings, find the option for Default Display Attribute (it might say “Display Name” or similar).
  3. Select the attribute you want (e.g., “Auction Title”).
  4. Save your changes.

Step 3: Update the Bid Form

  1. Open your Bid form in the Express Form Builder.
  2. Check the dropdown field for the auction selection. It should now automatically use the default display attribute (e.g., “Auction Title”) instead of just the id.

Step 4: Test the Form

Navigate to the Bid form on your site, and the dropdown should now display the more descriptive attribute (e.g., the title of the auction) instead of the auction IDs.

By setting the display attribute, you make your forms much more user-friendly, ensuring that users can easily identify the auctions they’re bidding on. Let me know if you encounter any further issues!

1 Like

It looks like Tim has got your express answer covered!

Going back a step, we’ve actually built a fully fledged auction add-on that works with Community Store. You add the products via Community Store, and mark products as auction products with particular settings. This automatically swaps a product page over to use an Auction block. That block then handles listing existing bids and accepted bids for logged in users. It’s ‘ebay’ proxy style bidding, where it will auto-bid up to a nominated amount.

Then once an auction is finished, the ability to actually purchase the product is unlocked for the winner of the auction, and they can purchase the item through Community Store’s normal checkout process.

It’s quite a nice setup, as you can have both auctions and normal product sales on the same site, plus use all of Community Store’s features.

I mention this for two reasons:

  • building an auction system is a pretty big undertaking, there’s lots of considerations, notifications, etc, and I’d be a little weary of using Express to handle lots of that. Not saying it’s not possible, but there’s often a lot of juggling of bid information, and you’ll need to be doing manual queries.
  • you’re welcome to reach out if you’re interested in using this add-on. I can point you at demo, etc.
1 Like

Hello Tim, thank you for the information. You’re not the only source of info I received that indicated the solution was in the ‘Display Name’ business (ChatGPT). However, in my system (v9.3.9) there’s no such option in the ‘Edit Entity’ tab where I’m guessing is what you meant by ‘entity settings’. No ‘Default Display Attribute’ or ‘Display Name or similar’ fields. Got a screen grab of what this looks like?

Cheers!

Thanks Ryan, if I wasn’t already on the finish line I’d look into that for this project. I am interested in the demo.

For this project, I just need to figure out this last little thing. The system is complete to what they require. They will use it for leads only and follow-up in person (it’s a local thing).

Figure this out. It’s what the NAME MASK is for. I just set it to :

%auction_year% %auction_make% %auction_model%

Looks like this is also controllable through the form field settings.