MODDED for "Custom" Custom Fields output
I am trying to convert ClassiPress into a version that can handle real estate for sale or rental listings. One of the things I really liked about another non
WP php program for real estate is the many customizations allowed in the Forms Builder. And one of the things that allows for real estate listing is to show "list boxes" per type of related values.
Right now ClassiPress only stores a Dropdown list with multiple options. As far as I remember only one value or option can be selected. But I need a way to easily allow a user to see all of his or her choices and to click as many as apply to their ad.
The form builder in ClassiPress so far only allows storing one value per custom field outside of the Dropdown list option. So, I have had to mod to create this extra capability in the Form builder.
For instance, in a case where a home or rental or office building has "Extras" or "Community Resources" or "Property Amenities" or "House Amenities". And the same values or lists of things could apply to many ads. 20 rental properties might have the same "amenities"---"Covered parking, playground, laundry, gym," etc, etc
But instead of a Dropdown list that only stores one option, a Multiple select checkbox can store all those options for a Rental form in a Checkbox named "amenities". When the form is displayed while the user is making an ad the user can quickly check however many of those checkbox options apply. When the ad is submitted the checkbox values get saved in ONE field as comma delimited values.
When the AD is displayed on the website then those checkbox values can be returned not in checkboxes but displayed inside their own unordered sequential lists with separate CSS styling to stylize and postion them on the single-default one-page-per-ad view.
This is what I am in the progress of creating.
At the moment I can go into the Form Builder and create a whole multi-value series of checkboxes for just one series of options, such as for a Service such as a Dentist office...I can put in "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday". Then if the User selected an Ad in the Dentist category the custom form will display with a checkbox form included to allow the user to simply click the appropriate days of the week very quickly.
The submitted ad will store the values in one field in the "meta_value" field of wp_postmeta.
The ad online will show whatever Field Label I wrote such as "Office Open on:"
and Monday, Tuesday, Thursday can either show up as a vertical list or as a horizontal string with commas.
Today I have created the function which displays all of these separate checkboxes in their own format boxes for individual ads and only displays the checkboxes that were clicked and submitted when the ad was created.
Then I will modify the function now gathering custom fields to exclude from displaying these checkbox values.
I am hoping that David and Seth and the gang will upgrade the Form Builder so that these kinds of things are available in the "off-the-shelf" ClassiPress.