Okay
  Public Ticket #2620131
How to add classes to modal input
Closed

Comments

  •  1
    Fabien Coutant started the conversation

    Dear support,

    I need to only my user to update/add entries with a searching function. In my case I have a column named "lastname" that must only display people link to the user (I'm using a meta_data). When the user select someone, some other column in the same row must be auto filled like the "firstname". I used this searching/prefill function in forms with select2js linked to css tags. 

    However I have 2 issues:

    - In the tab I'm able to add css classes to column's cells and use the inline editing (that display my select2js with searching information I'm especting). But it's not easy to find the column I need to auto fill in the same row and save the information. 

    - For new entries the css classes are not applied to inputs in the modal. My select2js field never appears. (cf.screens).

    I also searched around creating a second tab with all the data that need to be auto fill but I'm not able update several information link to one select and I can't filter on data that my user must see and not see.

    So I'm wondering if you have a solution to my needs...

    King regards,

    Fabien

  •  2,572
    Aleksandar replied

    Hello Fabien

    One column cannot be auto-filled based on values from a different column. Something like this needs to be developed as a custom solution, and it isn't included in the provided support for the plugin.

    Also, you can't add custom CSS like shown in your screenshot.

    In the Custom CSS Class(es) field you only need to add the class, so "example". Then, you need to define that class in wpDataTables settings/Custom JS and CSS, so for example:

    table.wpDataTable .example {
    color: red;
    }

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables