PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Name and Address sections

  1. m_batchelor
    Member

    Can anyone tell me how I can edit the Name and Address sections of a form. At the moment the First, Last, City etc titles are below the text boxes but I would like the label to be above the text box. Also is it possible to make certain parts of the address field none compulsary.

    Thanks

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  2. There is no way to automatically change the sub-labels via a setting, but you can find out more info on getting that to work via jQuery by starting here:

    http://www.gravityhelp.com/forums/topic/change-position-of-sub-labels-on-advanced-fields

    For the address validation piece you can find more info on that via this thread:

    http://www.gravityhelp.com/forums/topic/individually-set-required-not-required-for-each-input-of-the-address-field

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  3. m_batchelor
    Member

    I have tried that and it does not work. Can you look at this again please. It seems strange to put it below the box in the first place. it is important that this is sorted out very soon.

    <?php wp_enqueue_script("jquery"); ?>
    <?php
    wp_head();
    ?>

    <script type="text/javascript">
    jQuery(document).ready(function() {

    jQuery('.gfield_description').each(function(i,e){
    fielddesc = jQuery('<div>').append(jQuery(e).clone()).remove().html();
    jQuery(e).siblings('label.gfield_label').after(fielddesc);
    jQuery(e).remove();
    });

    });
    </script>

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  4. Got a link to your form page by chance?

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  5. m_batchelor
    Member

    Hi,

    http://www.x-particle.com/?page_id=22
    We have the page hidden until its all sorted.

    Thanks

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  6. Placing this worked for me:

    <script type="text/javascript">
          jQuery(document).ready(function() {
    
              jQuery('.ginput_container label').each(function(i,e){
                  fielddesc = jQuery('<div>').append(jQuery(e).clone()).remove().html();
                  jQuery(e).siblings('.ginput_container input').before(fielddesc); //moves sub label above input fields
                  jQuery(e).siblings('.ginput_container select').before(fielddesc); //moves sub label above select fields (e.g. country drop-down)
                  jQuery(e).remove();
              });
    
          });
      </script>

    You also seem to have some odd JS error here too (i dont think its related to this, but wanted to point it out nonetheless). The formatting is a bit off, with a paragraph element inside the script tag and such.

    http://grab.by/bULY

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  7. m_batchelor
    Member

    Thanks for that,

    I had noticed the page error, it is in the cart66 script. I will need to get hold of them to sort it out.

    Is there any way to sort out the formatting of the country dropdown box.

    Thanks again

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  8. Try dropping this in to your theme's stylesheet:

    [css]
    #input_1_2_6 {
    margin-top: 36px;
    }
    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  9. m_batchelor
    Member

    Thanks again, that brings it in line but the Country field name is still not visible

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  10. Hmm, not sure. One of our other users has used this with no isses, see screenshot (did not want to post their URL they sent via email):

    http://grab.by/bUPi

    Has to be something with your theme or potentially another script or plugin. I did notice a blank paragraph tag below the select - that our other user's site does not have:

    http://grab.by/bUPk

    That's about the only discrepancy I can see from this high level.

    Posted 12 years ago on Saturday February 11, 2012 | Permalink
  11. TheTyke
    Member

    Hi
    Tried the snippet of code and it works fine, but it has a knock on effect when I am using products and total. It stops the total function working and messes with the css.
    An example of the issues can be found here.

    http://www.mad99.co.uk/5-page-website-order-form/

    I know having the field labels below might seem like a minor irritation to some, but I find it really annoying!!!!

    Posted 12 years ago on Friday April 20, 2012 | Permalink