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.

first/ last name labels into Japanese

  1. triceratops
    Member

    Hi
    I'm trying to change the 'first' and 'last' labels of the name field into japanese. I put this into my theme functions.php ....

    <?php
    add_filter("gform_name_first", "change_name_first", 10, 2);
    function change_name_first($label, $form_id){
    return "名";
    }
    ?>

    It's changing, but I'm not getting the correct character - the form shows two question marks. How can I get the Japanese showing?

    Thanks
    Mark

    Posted 11 years ago on Monday July 2, 2012 | Permalink
  2. Can you provide a link to your form online please?

    Posted 11 years ago on Monday July 2, 2012 | Permalink
  3. triceratops
    Member

    Thanks. Here's the test page ....
    http://www.starlightstudio.jp/wordpress/?page_id=54

    Posted 11 years ago on Monday July 2, 2012 | Permalink
  4. I see what you mean. Can you try using the HTML entity for the Japanese word rather than the actual symbol?

    Posted 11 years ago on Monday July 2, 2012 | Permalink
  5. triceratops
    Member

    Success! Thanks!
    http://www.starlightstudio.jp/wordpress/?page_id=54

    Where can I change the size of the text for the labels and also the width of the input fields?

    Thanks
    Mark

    Posted 11 years ago on Tuesday July 3, 2012 | Permalink
  6. David Peralty

    You would create CSS values in your style.css to override what is currently there. You would add the !important tag to any declarations.

    #wrap .gform_wrapper .top_label .gfield_label {
    font-size: 1.4em !important;
    }

    This would increase the label font size.

    Posted 11 years ago on Tuesday July 3, 2012 | Permalink
  7. triceratops
    Member

    Hi David

    Thanks. That changes the size of all the labels above the fields, but not the 'first' or 'last' labels underneath the name input fields. Where can I find that? And the width of the fields?

    Thanks
    Mark

    Posted 11 years ago on Wednesday July 4, 2012 | Permalink
  8. David Peralty

    Here you go:

    #wrap .gform_wrapper .ginput_complex label, #wrap .gform_wrapper .gfield_time_hour label, #wrap .gform_wrapper .gfield_time_minute label, #wrap .gform_wrapper .gfield_date_month label, #wrap .gform_wrapper .gfield_date_day label, .gform_wrapper .gfield_date_year label, #wrap .gform_wrapper .instruction {
    font-size: 1.4em !important;
    }

    That should control the rest of the label sizes.

    Posted 11 years ago on Wednesday July 4, 2012 | Permalink
  9. triceratops
    Member

    That works great. Thanks!
    Any advice on field width?

    Thanks
    Mark

    Posted 11 years ago on Thursday July 5, 2012 | Permalink
  10. David Peralty

    Same kind of thing, you need to find what CSS is editing it. What I do is I right click on it with Google Chrome and select Inspect element and then change the CSS based on what I think I need.

    Posted 11 years ago on Thursday July 5, 2012 | Permalink