The Todd
Forum Replies Created
-
scratch the above, it breaks everything else..I really love this FoundationPress, but I suppose I will attempt to modify it instead for now..
Thanks dude, was just finishing up a project, and said, hmm..I wonder if I can make this not echo automatically..and I checked google first like a good developer always does..
Worked perfectly, I simply replaced my existing plugin with the development version and it seems to be just fine..
Awesome plugin!
I posted a answer that would help you here:
I create a dropdown in the page template based on how they got there, and with this solution I am able to send that dropdown to the contact form 7 form for that page, and it passes the value along to the submission..
Hope this helps!
The Todd
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Populate Select Box from databaseI can offer a better solution, or at least one that does not require hacking the contact form 7 plugin..
I’m not sure if this is even the best way, but it works for me!
I added the plugin:
http://wordpress.org/extend/plugins/contact-form-7-dynamic-text-extension/
and then in the form where I want the select box to be, I add some shortcode..
[autoselectfleet][dynamichidden fleet id:fleet ]
The page is using a template,
`$content = do_shortcode( $post->post_content );
$new_content = str_replace(‘[autoselectfleet]’, $fleet_selector, $content);`where
$fleet_selectoris the selector I made..On that select box,
onchange='document.getElementById('fleet').value=this.value;'and I also added a javascript snippet to first populate that box on page load with a preselected value for the dropdown, as they arrive on my form after first picking something somewhere else, and that value is one of the dropdown values, I added select=’selected’ to the value in the dropdown as well..
all this simply allowed the email to grab those dynamic hidden values and use them as needed..
Hope to have helped, lemme know if you need better explanation..
The Todd