• Resolved daliasued

    (@daliasued)


    Hi, thank you for your beautiful plugin, I would like to know if you can help me with this?

    ACF Views
    
    ISBN:
    
    9780226971513
    
    Título nativo:
    
    西遊記西游记Xi You Ji
    
    Títulos:
    
    Journey to the WestViaje al oesteWest Journey Record
    
    Editorial:
    
    Bla bla
    
    Páginas:
    
    587
    
    Fecha de edición:
    
    01/01/1500
    
    I need (In the same line) ¿It’s possible?
    
    ISBN: 9780226971513
    
    The other thing is that if you have more values in the fields, it puts it all together. How can you add a separator?
    
    Example:
    Títulos: Journey to the West, Viaje al oeste, West Journey Record
    Or:
    Títulos: Journey to the West
    Viaje al oeste
    West Journey Record

    Best regards,

    Dalia

    • This topic was modified 3 years, 1 month ago by daliasued.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author WPLake

    (@wplakeorg)

    Hi @daliasued

    Thank you for the kind words and for choosing ACF Views!

    To display the field on the same line as the label, you could add some CSS.

    /* display view id 865 field values on 1 line */
    .acf-view.acf-view--id--865.acf-view--object-id--730 .acf-view__row {
        display: flex;
    }
    
    /* prepend 3 px padding before field */
    .acf-view.acf-view--id--865.acf-view--object-id--730 .acf-view__field {
        padding-left: 3px;
    }

    For multiple values on the same line, also solved by using CSS.
    I’ve used the Checkbox field type for my example below. You’ll see that this will add a “,” comma and some padding after each value, excluding the last.

    /* display all checkbox values on 1 line */
    .acf-view__choice:not(:last-child)::after {
        content: ",";
        padding-right: 3px;
    }

    Thread Starter daliasued

    (@daliasued)

    Good morning @wplakeorg and thanks for your reply:

    I tried the CSS that you kindly provided me:

    1. Sadly didn’t work.
    2. I understand that the field value 865 is the ID “Shortcode details books” from my site and your plugin.
    3. What is the object id 730?
    4. The ACF field group ID is “Fields 15” “ID 673”
    5. In ACF Views “Field Options” I tried to put “,”, but when I saved it, it comes back and puts “Field”, I mean the name of the field and erased the “,”.
    6. I tried the CSS you provided me for “,” but it doesn’t work for me either.

    I don’t know what I’m doing wrong with your plugin. I’m not an expert either, I’ve learned along the way “puyando” as we say around here.

    Plugin Author WPLake

    (@wplakeorg)

    Hi @daliasued

    My apologies I have added the page id (object-id) in the declaration of the class by mistake. In my CSS I am restricting the style to the ACF View with ID 865 (Your View).

    Please use the following instead, pasted into the CSS code on the Advanced tab;

    /* display view id 865 field values on 1 line */
    .acf-view.acf-view--id--865 .acf-view__row {
        display: flex;
    }
    
    /* prepend 3 px padding before field */
    .acf-view.acf-view--id--865 .acf-view__field {
        padding-left: 3px;
    }

    Regarding the multiple values on a single line, you need to also paste the CSS code below to the CSS code in the Advanced tab

    /* display all checkbox values on 1 line */
    .acf-view__choice:not(:last-child)::after {
        content: ",";
        padding-right: 3px;
    }

    The style above will only work if your ACF field “Títulos” is the Checkbox field type.

    Thread Starter daliasued

    (@daliasued)

    Hello again @wplakeorg!

    You don’t have to apologize, if it’s me that has to do it, I’m doing tests to see if my site works the way I want and then I’m going to buy the PRO versions of you and ACF. I have bought beautiful premium templates, but I can’t put things the way I want.

    • The option of the same line is “resolved”
    • The problem with the “,” remains the same, I can’t put it in “Identifier>Field Options”, I did a test with “-” it is recorded, but it doesn’t show it in the Frontend.
    Plugin Author WPLake

    (@wplakeorg)

    Hi @daliasued

    That’s good news!
    Let’s go through the steps to make sure we didn’t skip something, and see if we can resolve your other dilemma.

    So, have you;
    a. Created an ACF Checkbox field?
    b. Did you assign the Field in your View?
    c. That the ‘CSS code’ below is pasted in the CSS code field of the View. (Not in the field options, it’s located all the way at the top of your View edit screen inside the “Advanced” tab)
    d. Select or Fill the field on the page where you located the ACF Checkbox?

    /* display all checkbox values on 1 line */
    .acf-view__choice:not(:last-child)::after {
        content: ",";
        padding-right: 3px;
    }
    
    /*  Uncomment this when it should apply globally
    .acf-view__row {
        display: flex;
    }
    */
    Thread Starter daliasued

    (@daliasued)

    Hi @wplakeorg, I am answering in the order of your questions.

    a. Created an ACF Checkbox field?

    The fields I used in the post type “Libros”:

    • Image
    • Text Area
    • Text
    • Taxonomy
    • Number
    • Date Picker
    • URL (But just for backend)

    b. Did you assign the Field in your View?

    Yes, I did, you mean ACF Views right?, but I don’t have Checkbox fields, I have “Text” “Date” and “Taxonomy”, etc in this post type.

    c. That the ‘CSS code’ below is pasted in the CSS code field of the View. (Not in the field options, it’s located all the way at the top of your View edit screen inside the “Advanced” tab)

    Yes, I used the the tab “Advance”

    d. Select or Fill the field on the page where you located the ACF Checkbox?

    I don’t understand this part.

    And last, Do you mean Customize>CSS in my Theme?, I did it, but it doesn’t work, I figured it must be because I don’t have “Checkbox”.

    /*  Uncomment this when it should apply globally
    .acf-view__row {
        display: flex;
    }
    */
    

    If you want access to my site I can give it to you, it’s a test site, my other site has a premium theme.

    Thread Starter daliasued

    (@daliasued)

    @wplakeorg OMG now I understand what you say, in “Appearance” of “ACF” I have “Multi Select” , because in asian dramas and movies, you have multiple choices for example when they start the movie, we only have the native name, so we use the literal title, and when they going to released the movie we have the definitive title.

    I started to review the ACF of a post type and that’s why I understood, sorry

    Plugin Author WPLake

    (@wplakeorg)

    Hi @daliasued

    Perhaps there’s a misunderstanding with the ACF advanced thing. I did mean ACF View.

    I checked your page again and see the output is a link.

    Paste this CSS instead. It should work.

    a.acf-view__link:not(:last-child)::after {
        content: ",";
        padding-right: 3px;
    }
    Thread Starter daliasued

    (@daliasued)

    Hi @wplakeorg, YES is working!, the fields are taxonomies, and when I go to “Appearance” in ACF I choose “Multi Select” NOT “Checkbox”. sorry for the inconvenience. https://woo.melodramaz.com/libros/prueba/

    Thank you so much!, now I’m trying to understand the ACF Cards hahaha.

    Plugin Author WPLake

    (@wplakeorg)

    That’s great to hear.

    You can learn more from our extensive docs here.

    Enjoy the rest of your project.

    Please take 2 minutes to rate and review ACF Views.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Fields in the same line’ is closed to new replies.