Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Editing form-listing.php to place custom fields in logical places. (need some help)

  1. #1
    Thread Starter
    Member sean's Avatar
    Join Date
    May 2011
    Location
    Baguio, Philippines / Guam, USA
    Posts
    57
    Thanks
    10
    Thanked 4 Times in 3 Posts

    Editing form-listing.php to place custom fields in logical places. (need some help)

    Hello,

    I am trying to customise the form-listing.php so the create listing and edit listing pages will have a logical field entry order. I can't seem to get custom fields to update though. The field and field content shows up but if it is edited and submitted the changes do not take effect. Any ideas would be greatly appreciated.

    Here is the code:

    <?php global $va_options; ?>
    <div id="main">


    <?php do_action( 'appthemes_notices' ); ?>


    <div class="section-head">
    <h1><?php echo $title; ?></h1>
    </div>




    <form id="create-listing" enctype="multipart/form-data" method="post" action="<?php echo $form_action; ?>">
    <?php wp_nonce_field( 'va_create_listing' ); ?>
    <input type="hidden" name="action" value="<?php echo ( get_query_var('listing_edit') ? 'edit-listing' : 'new-listing' ); ?>" />
    <input type="hidden" name="ID" value="<?php echo esc_attr( $listing->ID ); ?>" />


    <fieldset id="essential-fields">
    <div class="featured-head"><h3><?php _e( 'Listing Essentials (Required)', APP_TD ); ?></h3></div>








    <?php
    // if categories are locked display only the current listing category
    if ( va_categories_locked() )
    $listing_cat = $listing->category;
    else
    $listing_cat = array();
    ?>


    <fieldset id="category-fields">


    <div class="form-field"><label>
    <?php _e( 'Category', APP_TD ); ?>
    <?php wp_dropdown_categories( array(
    'taxonomy' => VA_LISTING_CATEGORY,
    'hide_empty' => false,
    'hierarchical' => true,
    'name' => '_'.VA_LISTING_CATEGORY,
    'selected' => $listing->category,
    'show_option_none' => __( 'Select Category', APP_TD ),
    'class' => 'required',
    'orderby' => 'name',
    'include' => $listing_cat
    ) ); ?>
    </label></div>


    </fieldset>


    <div class="form-field"><label>
    <?php _e( 'Business Name', APP_TD ); ?>
    <input name="post_title" type="text" value="<?php echo esc_attr( $listing->post_title ); ?>" class="required" />
    </label></div>




    <div class="form-field">
    <?php $coord = appthemes_get_coordinates( $listing->ID ); ?>
    <input name="lat" type="hidden" value="<?php echo esc_attr( $coord->lat ); ?>" />
    <input name="lng" type="hidden" value="<?php echo esc_attr( $coord->lng ); ?>" />


    <label>
    <?php _e( 'Location (street address, city, state)', APP_TD ); ?>
    <input id="listing-address" name="address" type="text" value="<?php echo esc_attr( $listing->address ); ?>" class="required" />
    </label>
    <input id="listing-find-on-map" type="button" value="<?php esc_attr_e( 'Find on map', APP_TD ); ?>">


    <div id="listing-map"></div>
    </div>
    </fieldset>








    <fieldset id="contact-fields">
    <div class="featured-head"><h3><?php _e( 'Regular Options', APP_TD ); ?></h3></div>


    <div class="form-field phone"><label>
    <?php _e( 'Phone Number', APP_TD ); ?>
    <input name="phone" type="text" value="<?php echo esc_attr( $listing->phone ); ?>" />
    </label></div>


    <div class="form-field phone"><label>
    <?php _e( 'Fax Number', APP_TD ); ?>
    <input name="app_fax" type="text" value="<?php echo esc_attr( $listing->app_fax ); ?>" />
    </label></div>


    <div class="form-field phone"><label>
    <?php _e( 'Email', APP_TD ); ?>
    <input name="app_email" type="text" value="<?php echo esc_attr( $listing->app_email ); ?>" />
    </label></div>


    <div class="form-field listing-urls web">
    <label>
    <?php _e( 'Website', APP_TD ); ?><br />
    <span>http://</span><input name="website" type="text" value="<?php echo esc_attr( $listing->website ); ?>" />
    </label>
    </div>


    <div class="form-field"><label>
    <?php _e( 'Hours', APP_TD ); ?>
    <input name="app_hours" type="text" value="<?php echo esc_attr( $listing->app_hours ); ?>" />
    </label></div>










    <div class="featured-head"><h3><?php _e( 'Bold Listings Options', APP_TD ); ?></h3></div>






    <fieldset id="misc-fields">
    <div class="form-field images">
    <?php _e( 'Listing Images', APP_TD ); ?>
    <?php the_listing_image_editor( $listing->ID ); ?>
    </div>


    <div class="form-field"><label>
    <?php _e( 'Business Description', APP_TD ); ?>
    <textarea name="post_content"><?php echo esc_textarea( $listing->post_content ); ?></textarea>
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'Tags', APP_TD ); ?>
    <input name="tax_input[<?php echo VA_LISTING_TAG; ?>]" type="text" value="<?php the_listing_tags_to_edit( $listing->ID ); ?>" />
    </label></div>
    </fieldset>










    <div class="form-field phone"><label>
    <?php _e( 'Skype (username)', APP_TD ); ?>
    <input name="app_skype" type="text" value="<?php echo esc_attr( $listing->app_skype ); ?>" />
    </label></div>


    <div class="form-field listing-urls facebook">
    <label>
    <?php _e( 'Facebook', APP_TD ); ?>
    <span>facebook.com/</span><input name="facebook" type="text" value="<?php echo esc_attr( $listing->facebook ); ?>" />
    </label>
    </div>
    </fieldset>


    <div class="form-field listing-urls twitter">
    <label>
    <?php _e( 'Twitter', APP_TD ); ?>
    <span>@</span><input name="twitter" type="text" value="<?php echo esc_attr( $listing->twitter ); ?>" />
    </label>
    </div>







    <fieldset id="category-fields">


    <div id="custom-fields">


    <div class="form-field"><label>
    <?php _e( 'Blog (link)', APP_TD ); ?>
    <input name="app_blog" type="text" value="<?php echo esc_attr( $listing->app_blog ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'RSS Feed (link)', APP_TD ); ?>
    <input name="app_rss" type="text" value="<?php echo esc_attr( $listing->app_rss ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'LinkedIn (link)', APP_TD ); ?>
    <input name="app_linkedin" type="text" value="<?php echo esc_attr( $listing->app_linkedin ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'YouTube (link)', APP_TD ); ?>
    <input name="app_youtube" type="text" value="<?php echo esc_attr( $listing->app_youtube ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'Google+ (link)', APP_TD ); ?>
    <input name="app_googleplus" type="text" value="<?php echo esc_attr( $listing->app_googleplus ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'Pinterest (link)', APP_TD ); ?>
    <input name="app_pinterest" type="text" value="<?php echo esc_attr( $listing->app_pinterest ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'Vimeo (link)', APP_TD ); ?>
    <input name="app_vimeo" type="text" value="<?php echo esc_attr( $listing->app_vimeo ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'Podcasts (link)', APP_TD ); ?>
    <input name="app_podcasts" type="text" value="<?php echo esc_attr( $listing->app_podcasts ); ?>" />
    </label></div>


    <div class="form-field"><label>
    <?php _e( 'Yahoo Group (link)', APP_TD ); ?>
    <input name="app_yahoogroups" type="text" value="<?php echo esc_attr( $listing->app_yahoogroups ); ?>" />
    </label></div>


    </fieldset>


    <fieldset id="category-fields">


    <div id="custom-fields">
    <?php
    if ( $listing->category ) {
    the_listing_files_editor( $listing->ID );






    va_render_form( (int) $listing->category, $listing->ID );
    }
    ?>
    </div>




    </fieldset>




    <?php do_action( 'va_after_create_listing_form' ); ?>


    <fieldset>
    <div class="form-field"><input type="submit" value="<?php echo esc_attr( $action ); ?>" /></div>
    </fieldset>


    </form>


    </div><!-- #content -->


    </div><!-- /#main -->


    <div id="sidebar">
    <?php dynamic_sidebar( 'create-listing' ); ?>
    </div>

  2. #2
    tcarter's Avatar
    Join Date
    Jun 2011
    Location
    United States
    Posts
    424
    Thanks
    15
    Thanked 91 Times in 77 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    Member sean's Avatar
    Join Date
    May 2011
    Location
    Baguio, Philippines / Guam, USA
    Posts
    57
    Thanks
    10
    Thanked 4 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Thread Starter
    Member sean's Avatar
    Join Date
    May 2011
    Location
    Baguio, Philippines / Guam, USA
    Posts
    57
    Thanks
    10
    Thanked 4 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    Thread Starter
    Member sean's Avatar
    Join Date
    May 2011
    Location
    Baguio, Philippines / Guam, USA
    Posts
    57
    Thanks
    10
    Thanked 4 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  6. #6
    Expired Customer snowball77's Avatar
    Join Date
    Mar 2013
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  7. #7
    Expired Customer snowball77's Avatar
    Join Date
    Mar 2013
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  8. #8
    Thread Starter
    Member sean's Avatar
    Join Date
    May 2011
    Location
    Baguio, Philippines / Guam, USA
    Posts
    57
    Thanks
    10
    Thanked 4 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  9. #9
    Expired Customer snowball77's Avatar
    Join Date
    Mar 2013
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  10. #10
    Thread Starter
    Member sean's Avatar
    Join Date
    May 2011
    Location
    Baguio, Philippines / Guam, USA
    Posts
    57
    Thanks
    10
    Thanked 4 Times in 3 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom Fields Not Showing Up on Create Listing Form
    By manilaboy in forum Report Vantage Bugs (Legacy)
    Replies: 37
    Last Post: July 1st, 2013, 06:40 AM
  2. Problem with checkboxes in custom fields and add listing form
    By nibigo in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: October 6th, 2012, 10:07 AM
  3. [MOD NEEDED] Adding Custom Fields to Add New Listing Form in Classipress
    By starleadgeneration in forum ClassiPress General Discussion
    Replies: 5
    Last Post: September 22nd, 2012, 01:42 AM
  4. Editing Custom Form
    By pitarr in forum Report ClassiPress Bugs
    Replies: 1
    Last Post: February 26th, 2011, 06:22 PM
  5. Editing custom fields
    By rtibbs4 in forum ClassiPress General Discussion
    Replies: 2
    Last Post: August 13th, 2009, 08:11 PM