WordPress.org

Ready to get started?Download WordPress

Forums

Gravity Forms Directory
[resolved] Set Column Width (17 posts)

  1. ZeroGravity
    Member
    Posted 1 year ago #

    Is there anyway to set the width of columns. I have a phone number that is being split across 2 lines, doesn't look very professional. It looks OK in FireFox but Chrome and IE split the number.

    Thanks!!

    http://wordpress.org/extend/plugins/gravity-forms-addons/

  2. ZeroGravity
    Member
    Posted 1 year ago #

    Anyone??? Please... Even if the answer is no. I have a client waiting for a listing to be added to their site.

  3. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Use CSS to set width.

  4. ZeroGravity
    Member
    Posted 1 year ago #

    At the moment CSS sets all the columns to the same width as there doesn't seem to be any way to target individual columns. Is there a way to get different classes set on individual columns so a different width can be set for each column?

    At the moment in the table header all columns have a class of "manage-column". In the body all the cells have a class of "text". I was hoping I had missed a setting somewhere that would either add classes or set the width.

  5. Martin
    Member
    Posted 1 year ago #

    There must be a way to assign some AddFilter thing to give each FormID it's own CSS Class

  6. ZeroGravity
    Member
    Posted 1 year ago #

    I ended up editing gravity-forms-addons.php and adding an id to the TH cell.

    <th id="gfa-col<?php echo $field_id ?>" scope="col" class="manage-column">

    I also added it to the jssearch line as well. Can you see any problem with this Zack? It would be great if this (or something similar) could be added to the plugin to aid in the styling.

    Thanks for the plugin Zack.

  7. Martin
    Member
    Posted 1 year ago #

    A bit out of my expertise, unfortunately.
    I looked in the php file but was unable to find where or how to add/replace the CSS classes with the FormID.

    It's a pity this plugin is so unsupported - great potential indeed.

  8. ZeroGravity
    Member
    Posted 1 year ago #

    @Rastarr I agree with you on the potential.

    As for the line numbers I think these should be pretty close. Change line 1457 to add the ID.
    <th id="gfa-col<?php echo $field_id ?>" scope="col" class="manage-column" onclick="Search...

    and line 1459 to
    <th id="gfa-col<?php echo $field_id ?>" scope="col" class="manage-column">

    and line 1461 also to
    <th id="gfa-col<?php echo $field_id ?>" scope="col" class="manage-column">

    This will ad IDs gfa-col1, gfa-col2 etc to the column headers which you will be able to style in style.css. I hope that helps.

  9. Martin
    Member
    Posted 1 year ago #

    Thanks Darren.

    I was really after styling the <li> Classes.

    Any chance you know where they might be and coded?

  10. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    I'll add IDs to the next release. Thanks for the idea.

  11. ZeroGravity
    Member
    Posted 1 year ago #

    Thanks Zack!!

  12. Martin
    Member
    Posted 1 year ago #

    Oh for sure. Thank you.
    It'll allow the plugin much more power

  13. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Coming very soon!

  14. mshetler
    Member
    Posted 1 year ago #

    I see field ID's have been added. Can you clue me in how to structure CSS?

  15. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Sorry, I don't provide CSS support.

    http://www.w3schools.com/css/

  16. mshetler
    Member
    Posted 1 year ago #

    Just looking for the ID/Class to use -- is it in the form of #gf-col-(form ID)-(field ID)?

  17. Zack Katz
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, #gf-col-[form_id]-[field_id]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic