-
AuthorPosts
-
November 6, 2015 at 12:24 am #531264
So glad to see my request for Mailchimp Integration finally made it, and so far it’s looking great, but there is one essential feature missing for me, and that’s the ability to have a default value in a field.
It’s pretty common to have the same form on multiple pages on the site, but to have a hidden text field with a value to identify the page which the form was sent from. On my site I have a generic ‘notes’ text field which I populate with a description so I can track if the form came from a specific page or promotion etc.
That’s really important in accurately tracking the performance of pages/posts etc.
Would love to see this in the Avia builder, but even if it’s not in the UI, can this be achieved reliably by setting a value=’blah’ field in the debug window?
November 6, 2015 at 3:40 pm #531467As a follow up, I’ve been reviewing how I use my list this morning and this is a real killer for me. It’s vital that i can track which form they came from, so without the ability to populate the hidden fields and have them sent to MailChimp I won’t be able to use this..
November 10, 2015 at 3:06 am #533004Hey!
Check if this code in theme / child functions.php works:
add_filter('ava_mailchimp_contact_form_elements', 'add_hidden_referrer_element', 10, 1); function add_hidden_referrer_element($args) { $new_array = array( 'referrer' => array( "id"=>'referrer', "type"=>'hidden', "value" => "http://google.com" ) ); return array_merge($new_array, $args); }
If it does, you could change
http://google.com
to something like get_post_permalink().Regards,
JosueNovember 10, 2015 at 10:59 pm #533732Whilst I can see what you’re trying to do, this wouldn’t really solve the issue.
I already have a large list, and a text field in that list for notes which needs to be populated with specific things on a per-form basis. This could be something like ‘front page promo’, ‘SD course october’, ‘VIP form’ etc.). I have automated follow-up campaigns which send to targetted segments of the list based on the specific value in these fields.
So, I need to be able to put specified text values in the fields in the form editor as a default value. And that field still needs to be sent even though it’s hidden.
November 11, 2015 at 12:59 am #533791You can put a is_page conditional before the array so it only gets added to forms in certains pages:
add_filter('ava_mailchimp_contact_form_elements', 'add_hidden_referrer_element', 10, 1); function add_hidden_referrer_element($args) { $hidden_values = array( 'referrer' => array( "type"=>'hidden', "value" => "" ), 'bar' => array( "type"=>'hidden', "value" => "" ), 'foo' => array( "type"=>'hidden', "value" => "" ) ); if(is_page(3763)){ $hidden_values['referrer']['value'] = 'One Value'; $hidden_values['bar']['value'] = 'One Value'; $hidden_values['foo']['value'] = 'One Value'; return array_merge($hidden_values, $args); }elseif(is_page(32)){ $hidden_values['referrer']['value'] = 'Another Value'; $hidden_values['bar']['value'] = 'Another Value'; $hidden_values['foo']['value'] = 'Another Value'; return array_merge($hidden_values, $args); }else{ return $args; } }
November 11, 2015 at 1:18 am #533803Thanks for your efforts on this so far Josue, and I will try that as an experiment, but really it’s a lot of faff as I often add a temporary page for a short-term promotion or specific event etc. and this kind of solution means a lot of messing around editing code etc. I really need to be able to populate the fields in the normal Avia page editor.
Given I’m currently using Danny’s Mailchimp4Wordpress plug-in, it seems to me it’s going to be a lot simpler for me to simply stick with that, which is a real shame and somewhat ironic as I was the person who originally requested the mailchimp integration two years ago!
I can’t imagine I’m the only person who needs to do this, it’s very common for someone to need to track their signups this way.
November 11, 2015 at 10:59 am #533918Yeah i’d suggest you stick to MC4WP for the moment, you should note that the Enfold MC widget is in its first iteration, in the future more features like that could be added in the GUI, feel free to post it as a request if you want.
Regards,
JosueOctober 1, 2016 at 4:00 pm #694221FYI for anyone else trying to do this. I was able to get the snippet that Josue posted working, but instead of the using the field name (i.e. referrer), I had to specify the index of the field as it appears in the Theme Settings > Newsletter > List fields.
'5' => array( "id"=>'5', "type"=>'hidden', "value" => "http://google.com" )
October 2, 2016 at 9:07 am #694298July 20, 2017 at 1:24 am #824275Any progress on this issue?
Sure the work around suggested are doable, but with a default value in the hidden fields the Mailchimp Integration is little more than a window dressing on a very good theme. The only practical way around this is NOT to use Mailchimp integration.So the question is what is the status of default values be available for hidden fields?
Thanks.July 23, 2017 at 8:55 pm #828747Hi,
We do not have an update for it right now we are afraid.
Best regards,
BasilisFebruary 9, 2018 at 4:27 pm #910309Hi,
is there any update on this issue? It would be really valuable for me to be able to use the hidden fields to track where users are signing up from.
Thanks,
Eva
February 10, 2018 at 11:08 pm #910667Hi,
We are afraid not yet, as they are not so high on our development list.
We will poke our developers again although.Best regards,
Basilis -
AuthorPosts
- You must be logged in to reply to this topic.