Jump to main content Jump to doc navigation

The bdHookNewListing snippet is to be used as a hook in a formit snippet call, which can be used to allow front-end users to create new listings.

Form Fields

You will want to cover every field the user needs to enter into the database. These are the expected field names you will want in the form (you can also checkout the schema on Github).

  • title
  • description
  • keywords
  • price (saved with 2 decimals)
  • pricegroup (integer ID of price group)
  • category (integer ID of category)
  • subcategory (integer ID of subcategory)
  • target (integer ID of target group (ages))
  • publishedon - date / timestamp, recognizes most formats.
  • companyname
  • contactinfo
  • address
  • neighborhood
  • zip
  • city
  • country
  • website
  • latitude and longitude. If both are empty it will retrieve it automatically based on address/zip/city/country values entered. If you don't need the country, add it as a hidden field to make sure enough data is available to retrieve the lat/long pair from the Google Maps API.

Support the team building MODX with a monthly donation.

The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.

Backers

  • modmore
  • STERC
  • Jens Wittmann – Gestaltung & Entwicklung
  • Fabian Christen
  • Dannevang Digital
  • Digital Penguin
  • Sepia River Studios
  • CrewMark
  • Chris Fickling
  • deJaya
  • Following Sea
  • Anton Tarasov
  • eydolan
  • Raffy
  • Lefthandmedia
  • Murray Wood
  • Nick Clark
  • Snow Creative
  • Helen
  • JT Skaggs
  • krisznet
  • YJ
  • Yanni
  • Richard

Budget

$371 per month—let's make that $500!

Learn more