-
AuthorPosts
-
March 15, 2019 at 11:51 pm #1079301
Hi,
– i’d like to have mail-chimp form on a single horizontal line, like something in the documentation (https://kriesi.at/documentation/enfold/mailchimp-signup/ ) under ” Playing with columns”. The example there is all HTML and no CSS and in the Mail Chimp element i can’t find a way to assign classes to each element of the form.
– Also how do i change the text on the submit button?
Thanks and regards,
SteffenMarch 18, 2019 at 7:38 pm #1080036Hey sugadaddy,
There is no need for classes for all elements.
Please refer to the solution posted here:Best regards,
VictoriaMarch 18, 2019 at 11:32 pm #1080137Thanks Victoria, but it’s not working. I’ve renamed the 1/2 layout-container horizontal-mailchimp as instructed. Neither flex nor inline is working, either.
BTW I’ve used this code fron the other thread you posted:
.horizontal-mailchimp .mc-field-group {
display: block;
width: 24vw;
float: left;
}
.horizontal-mailchimp .clear {
float: right;
margin-top: -57px;
margin-right: 12vw;
}March 22, 2019 at 12:51 am #1081627Hi,
Thanks for the update.
Are you using the theme’s mailchimp signup element? That css code is for the mailchimp embed code, so it’s not going work for the default mailchimp signup element. If you want to follow the documentation, you have to use this plugin.
// https://wordpress.org/plugins/mailchimp-for-wp/
Docs: https://kriesi.at/documentation/enfold/mailchimp-signup/#mailchimp-4-wordpress-plugin-integration > Playing with columns
Best regards,
IsmaelMarch 29, 2019 at 12:54 am #1084347Thanks Ismael. Why can i not apply flex or inline to the input and button element?
April 1, 2019 at 11:27 pm #1085736Hi,
You can’t use that particular css code because the html or structure of the theme’s mailchimp signup element is different from the embedded ones. You have to use the embed version of the form because that is where the css code is intended for. Would you mind providing a screenshot of the layout that you want to have? You can upload the screenshot to imgur or dropbox.
Best regards,
IsmaelApril 10, 2019 at 11:14 pm #1089269Hi Ismail,
here’s the layout with the two elements side by side ( link to layout ). Also note the pre-entered text. Where could I add this? And how can i change the text on the button?
Thanks and regards,
Steffen- This reply was modified 5 years, 9 months ago by sugadaddy.
April 12, 2019 at 1:16 am #1089799Hi,
You can use the theme’s mailchimp signup element instead. Insert two 1/2 columns, place the signup form in the second one and the add a text/code block on the first. Use that text/code block to create the text beside the form.
Best regards,
IsmaelApril 12, 2019 at 10:17 pm #1090157i believe that’s what i did (check out my site in the private comment section). I would like to know how to align the form elements (text input/button) side by side. And also how to change the text in the button and generate a preview text in the text input area.
April 15, 2019 at 3:37 am #1090810Hi,
The following custom css code hides the subscription button.
#av_section_6 > div > div > div > div > div.flex_column.av_one_half.flex_column_div.av-zero-column-padding.avia-builder-el-29.el_after_av_one_half.avia-builder-el-last.horizontal-mailchimp > form > fieldset > p.form_element.first_form.form_element.form_fullwidth.av-last-visible-form-element.modified_width { display: none !important; }
You have to remove it or replace it with this css code to align the fields.
.avia-mailchimp-form fieldset p { display: block; float: left; clear: none !important; }
Best regards,
IsmaelApril 23, 2019 at 10:01 pm #1093752sorry, i don’t get it, are you suggesting two separate Mailchimp elements side by side? If yes, how does the submit button know which adress was entered if the two aren’t connected? Could you also please adress the other questions?
April 25, 2019 at 3:18 am #1094262Hi,
Thanks for the update.
Sorry for the confusion. The first css code above was added somewhere in the Quick CSS field or the style.css file. You have to remove it because it’s hiding the signup fields. After removing the first css code, add the second one to align the mailchimp fields.
Best regards,
IsmaelApril 25, 2019 at 10:09 am #1094338ah ok! Thanks, Ismael. That aligned the elements side by side. Great! But they should align on the right side of their container. If I apply float:right the order of the elements gets switched up.
And the other two questions:
– How do I change the text on the button?
– How do I add a preview text in the input element like “you email” or something like that?- This reply was modified 5 years, 8 months ago by sugadaddy.
April 29, 2019 at 3:59 am #1095154Hi,
Thanks for the update.
1.) You have to modify the \config-templatebuilder\avia-template-builder\php\html-helper.class.php file directly. Look for this code around line 1743 inside the “mailchimp_list” function.
'label' => __( "Subscribe" , "avia_framework" ),
2.) The subscribe form input fields don’t contain placeholder attributes by default, but you can use a script to manually add the attribute. Try this script in the functions.php file:
add_action('wp_footer', 'ava_add_mailchimp_input_placeholder'); function ava_add_mailchimp_input_placeholder(){ ?> <script type="text/javascript"> $(function() { var email = $('.avia-mailchimp-form #avia_0_1'); var label = email.prev().text(); email.attr('placeholder', label); })(jQuery); </script> <?php }
Best regards,
IsmaelApril 29, 2019 at 11:43 pm #1095516I’m not proficient at JS. Where do i add the text within the JS function you posted? Thanks-
May 1, 2019 at 8:30 am #1096077Hi,
Thanks for the update.
You can add that code in the functions.php file. The actual script will be added in the frontend before the closing body tag.
Best regards,
IsmaelMay 2, 2019 at 10:05 pm #1096588no, i meant where do i change the displayed text. When i enter the script the displayed text is “E-Mail Address*”. I would like to change that but it is not obvious to me where i would alter it.
Also, i’ve changed the html-helper.class.php script and it had no impact.
- This reply was modified 5 years, 8 months ago by sugadaddy.
May 5, 2019 at 9:03 pm #1097499Hi,
Thanks for the update.
Find this line:
email.attr('placeholder', label);
Change label to a string or a custom text.
Example:
email.attr('placeholder', 'My text');
Best regards,
IsmaelMay 5, 2019 at 9:30 pm #1097509awesome, thanks Ismael. Now how do i get the input and button elements to align to the right side of their container?
May 7, 2019 at 4:34 am #1097915Hi,
Thanks for the update.
You can add this css code to push the fieldset to the right of the container.
.chimpy.avia-mailchimp-form fieldset { position: relative; left: 145px; }
Adjust the value as needed. You may need to add a few css media queries to adjust the left position on smaller screens.
Best regards,
IsmaelMay 8, 2019 at 11:26 am #1098419thanks. So, there is no way to float or flex them to the right?
May 12, 2019 at 5:42 pm #1099752Hi sugadaddy,
Best regards,
VictoriaMay 12, 2019 at 9:33 pm #1099833Hi Victoria, i would like to align the input and button elements to the right side of its container, like this https://pasteboard.co/IeoMOJr.png (right click & open in new tab)
- This reply was modified 5 years, 8 months ago by sugadaddy.
May 14, 2019 at 4:44 am #1100352Hi,
Thanks for the update.
Did you try the css code above?
thanks. So, there is no way to float or flex them to the right?
There is, but it will alter the space between the input fields. Try this css code.
.chimpy fieldset { text-align: right; } .chimpy fieldset p { display: inline-block; float: none; }
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.