Toggle fields group on the ClassiPress listing form

This mod can be useful if your ClassiPress listing form has too many fields and you want to toggle fields group visibility via button or a link.

Toggle visibility for a fields group

Especially, this important for mobile devices, where the long forms look complex and boring for your ad authors.

There are only two steps to implement this mod on your ClassiPress site.

1. Select which fields you want to toggle.

Use ClassiPress form builder and move all these fields below the listing Description field. The Description field will be the last field to be shown on page load. All fields below will be hidden until user clicked the Toggle link.

2. Add JavaScript snippet on your page.

Add the following code in your theme JavaScript scripts file.

jQuery( function( $ ) { $( 'form.form_step #list_post_content' ).each( function() { var collapsed = $( this ).nextUntil( '.ad-details-images-sep', '.form-field' ); if ( collapsed.le…
Read more about Toggle fields group on the ClassiPress listing form
  • 0