Print Cforms form as pdf

With help from a dev at WordPress Questions I got this solved. In wp-content/plugins/cforms/cforms.php we added require_once(dirname(__FILE__) . ‘/html2pdf/html2pdf.class.php’); which loaded all the necessary data from the folder html2pdf which has all the files based on code from html2pdf.fr Further in the same file after $newcontent .= substr($content,$last); we have code to pdfy the code: … Read more

Setting the value for the name attribute with cforms input fields

I found it. Under the Core Form Admin sections in the options, there’s an option called Use custom input fields names & ids, with the following note: This feature replaces the default NAMEs/IDs (e.g. cf_field_12) with custom ones, either derived from the field label you have provided or by specifically declaring it via [id:XYZ],e.g. Your … Read more

cannot find cforms action handler page

In the main cforms plugin folder, find the file called my-functions.php. You can add functions to that file as needed. Its pretty well-commented. What you want to do is add a function called my_cforms_logic or my_cforms_action, which get triggered at several different hooks during form submission and processing. According to the docs, you can move … Read more

cforms plugin function “my_cforms_logic” (for writing custom logic), is running 5 times

When it runs, check the $setting argument thats passed to the function. my_cforms_logic gets called on several different hooks, some of which run almost simultaneously. ### ### Your custom application logic features ### ### “successMessage” $cformsdata = cforms datablock ### “redirection” $cformsdata = cforms datablock ### “filename” $cformsdata = $_REQUEST ### “adminTO” $cformsdata = cforms … Read more

Enqueue styles after a plugin

Note that cForms is hooking into wp_head, and you’re attempting to hook into wp_enqueue_scripts. The wp_enqueue_scripts hook is fired inside the wp_head hook (at priority 0, IIRC). So, your stylesheet is being enqueued at wp_head, priority 0, and the cForms stylesheet is being enqueued at wp_head, priority 10. Since it outputs later, it is taking … Read more