Support » Plugin: Contact Form DB » Change font size / size of table

  • Resolved ByronFBP

    (@byronfbp)


    Hi, I have purchased the “Contact Form to DB Extension Edit”, and that has proved really useful.

    The problem I am having is that the below shortcode makes a table that is too wide for my page. (I am running version 2.4.5)

    Can I amend the font or size of the table at all?

    Also, If I try to use the cfdb-html shortcode, I get nothing showing, not sure if you have a quick fix for that too, as I thought that may autofit the browser window??

    Many thanks

    Byron

    [cfdb-datatable form=”Add new auction listing” show=”SOLD,Generic,Brand,Strength,Form,Pack,QTY,Expiry,LICENSED,FRIDGE,trust,E-mail,Phone,Notes” orderby=”Generic”]

    http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Michael Simpson

    (@msimpson)

    Set font-size of table: use the id & style attributes like:

    [cfdb-datatable form=”Add new auction listing” show=”SOLD,Generic,Brand,Strength,Form,Pack,QTY,Expiry,LICENSED,FRIDGE,trust,E-mail,Phone,Notes” orderby=”Generic” id=”mytable” style=”#mytable td div { font-size: 14pt }”]

    cfdb-html: works differently from other short codes because you need a beginning & end tag with stuff in the middle like:
    [cfdb-html]stuff in the middle like ${field-name}[/cfdb-html]
    Use the admin short code builder page to help fill out the “template” (middle) section. Also see documentation.

    Thread Starter ByronFBP

    (@byronfbp)

    Thanks Michael.

    I tried the following, varying the font size, but there as no change.

    Your advice would be appreciated.

    [cfdb-datatable form=”Add new auction listing” show=”SOLD,Generic,Brand,Strength,Form,Pack,QTY,Expiry,LICENSED,FRIDGE,trust,E-mail,Phone,Notes” orderby=”Generic” id=”mytable” style=”#mytable td div { font-size: 6pt }”]

    Would the cfdb-html be a more flexible option?

    Many thanks

    Byron

    Thread Starter ByronFBP

    (@byronfbp)

    PS, how can I make the Email field “clickable” to open an e-mail client?

    Many thanks

    Byron

    Plugin Author Michael Simpson

    (@msimpson)

    Try this one. Could search in datatables.net for more help
    [cfdb-datatable form="Add new auction listing" show="SOLD,Generic,Brand,Strength,Form,Pack,QTY,Expiry,LICENSED,FRIDGE,trust,E-mail,Phone,Notes" orderby="Generic" id="mytable" style=".dataTables_wrapper { font-size: 6pt }"]

    To make email clickable, you would need to wrap an email.
    I don’t know an easy way to do that with [cfdb-datatable] but with [cfdb-html] you can do it easily like

    [cfdb-html form="Add new auction listing" show="SOLD,Generic,Brand,Strength,Form,Pack,QTY,Expiry,LICENSED,FRIDGE,trust,E-mail,Phone,Notes" orderby="Generic" ]
    <a href="mailto:${email}">${email}</a><br/>
    [/cfdb-html]

    And you could further mark that up to be a table and even manually put in javascript to wrap it in a datatable (which you could copy by looking at the source of a page with [cfdb-datatable])

    Plugin Author Michael Simpson

    (@msimpson)

    Another user says the font size style thing worked; see thread

    Thread Starter ByronFBP

    (@byronfbp)

    Thanks

    Plugin Author Michael Simpson

    (@msimpson)

    On the “making email clickable question” I figured a way to do this using jQuery. See this post making URLs and emails clickable.

    Thread Starter ByronFBP

    (@byronfbp)

    That is awesome !!

    Thanks so much for providing a solution to that one Michael, I am sure it will benefit many users of your plugin.

    A modest donation has been sent to help keep the development of this plugin moving in the way you are taking it.

    Many thanks

    Byron

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Change font size / size of table’ is closed to new replies.