Michael Simpson
Forum Replies Created
-
Forum: Plugins
In reply to: [Contact Form DB] Order of columnsIn the shortcode, using “show” you can list the columns you want to see in order.
[cfdb-datatable form=”your-form-name” show=”column2,column1,column5″]If you are doing this in PHP, you can call “do_shortcode”.
Forum: Plugins
In reply to: [Contact Form DB] Tansform select options to imagesYou want the image in the table? You will need to transform your drop-down-field (whatever it is named) to a URL but then add JQuery to change that to an IMG tag.
[cfdb-datatable form="FORM_NAME" trans="drop-down-field=image_tranform(drop-down-field)" id="mytable"] {{AFTER}} <script type="text/javascript" language="Javascript"> (function($) { $(document).ready(function() { $("#mytable td[title='drop-down-field'] > div").each(function() { var imgTag = '<img src="' + $(this).html() + '" />'; $(this).parent().html(imgTag); }) }); })(jQuery); </script> {{/AFTER}} [/cfdb-datatable]Related: http://cfdbplugin.com/?page_id=1420
Forum: Plugins
In reply to: [Contact Form DB] Filling fields with data from the DBThoughts off the top of my head: you can create export links just like shortcodes. You could attach JavaScript (JQuery) to the drop down so that when the user chooses something, the JS does an Ajax call to an to an export link that returns JSON. you inject the filter value into the export link based on the user selection. Then the JS populated other form values from what is in the JSON.
Forum: Plugins
In reply to: [Contact Form DB] Wordfence is locking up on wp-db.phpWhat are you doing when this happens?
Forum: Plugins
In reply to: [Form to Post] Contact Form 7 FieldsSelect and Radio fields submit text values just like text fields. They are treated the same way.
Forum: Plugins
In reply to: [Contact Form DB] Tansform select options to imagesThere are examples of creating an example transform: http://cfdbplugin.com/?page_id=1076
Transform something like this:
require_once(ABSPATH . 'wp-content/plugins/contact-form-7-to-database-extension/CFDBPermittedFunctions.php'); function image_tranform($text) { // Given $text (value from drop-down, return the URL for the image to display return 'http://some-site/some-image.jpg'; } cfdb_register_function('image_tranform');Shortcode something like:
[cfdb-html form="FORM_NAME" trans="drop-down-field=image_tranform(drop-down-field)" id="mytable"] <img src="${drop-down-field}"/> [/cfdb-html]Forum: Plugins
In reply to: [Form to Post] meta tagsCode example for adding meta fields on a post: see
form_to_post_set_metaon
https://wordpress.org/plugins/form-to-post/Forum: Plugins
In reply to: [Contact Form DB] Addon,fuction,filter questionsSorry, I don’t recall the context of your earlier thread (too many for me to keep track of). Apply what? Can you provide more context or link to an earlier thread?
Forum: Plugins
In reply to: [Contact Form DB] Woocommerce Checkout Fields IntegrationAre you saying that when a user completes an order, you want a new entry inserted into CFDB with the order information?
Forum: Plugins
In reply to: [Form to Post] Contact Form 7 FieldsTo consolidate multiple fields into the post content, look at “f2p_consolidate_fields” on https://wordpress.org/plugins/form-to-post/
To create meta fields on the post, see form_to_post_set_meta
Forum: Plugins
In reply to: [Contact Form DB] Tansform select options to imagesI assume that your drop down, although it displays icons, submits a string value when the form is submitted. There is no simple way then to save the icon file with the form submission.
In a shortcode that displays the data, you could replace that string value with with an image is you have the images files accessible and know the mapping of string to image file. In this case you could write a transform to do that. Or you could add Javascript in the page to do it.
Forum: Plugins
In reply to: [Contact Form DB] images/pdfs are stored in DB?Forum: Plugins
In reply to: [Contact Form DB] Show db values in user profiles$formData->posted_data['group']will be a string not an object, so the->group-asyntax will not work. I don’t follow your intent. Maybe you mean== 'group-a'?Forum: Plugins
In reply to: [Contact Form DB] Blank screen on large database exportYour server probably ran out of memory during the export.
If you are using an export link, set “unbuffered=true”.
You may have to increase the amount of max memory for PHP on your site.
Forum: Plugins
In reply to: [Contact Form DB] Dateformat. Sorting1. On the CFDB Options page, change the date format to how you would like it to be.
2. The administration page will only sort what is on the page. On the CFDB Options page, you can set how many rows are loaded into the page at a time.
PS. A shortcode will sort across the whole data set.