46 function va_render_form( $categories, $taxonomy, $listing_id = 0 ) {
47 $fields = array();
48
49 foreach ( $categories as $category ) {
50 foreach ( va_get_fields_for_cat( $category, $taxonomy ) as $field ) {
51 $fields[$field['name']] = $field;
52 $fields[$field['name']]['cat'] = $category;
53 }
54 }
55
56 $fields = apply_filters( 'va_render_form_fields', $fields, $listing_id, $categories );
57 foreach( $fields as $field ) {
58 $html = html( 'div class="form-field"', scbForms::input_from_meta( $field, $listing_id ) );
59 echo apply_filters( 'va_render_form_field', $html, $field, $listing_id, $categories, $taxonomy );
60 }
61 }
There are currently 1 users browsing this thread. (0 members and 1 guests)