Unset a Cookie on Successful Gravity Forms form Submission [closed]

I ran this code to try setting a cookie on the gform_after_submission hook and it worked as expected. add_action( ‘gform_after_submission’, function() { setcookie( ‘boom’, ‘boom’, time() + 3600, “https://wordpress.stackexchange.com/” ); } ); The headers should not already be sent when the gform_after_submission action is triggered. If you’re getting a warning about this, there might be … Read more

Comment form connection to Gravity Forms

This is possible using the comment_post action, and the GFAPI class which handles entries in WordPress. What you need to first is add using comment_form_default_fields a field which is a checkbox. function add_to_email_list_field($fields) { $fields[‘add-to-email’] = ‘<p class=”comment-form-public”> <input id=”addtoemail” name=”addtoemail” type=”checkbox” /> <label for=”addtoemail”> Check this box to add yourself to our email list. … Read more

Gravity Custom Merge Tags [closed]

You need to add the new merge tags with the gform_custom_merge_tags filter, and then replace them with the gform_replace_merge_tags filter, like this: Edit: you need to use the gform_field_content filter to replace the field’s default value, see below. add_filter(‘gform_custom_merge_tags’, ‘wpse_121476_custom_merge_tags’, 10, 4); add_filter(‘gform_replace_merge_tags’, ‘wpse_121476_replace_merge_tags’, 10, 7); add_filter(‘gform_field_content’, ‘wpse_121476_field_content’, 10, 5); /** * add custom merge … Read more

Change gravity forms confirmation redirect query string to include entry id [closed]

I figured it out. I did have some syntax errors in my code. Should have been add_filter instead of add_action. Also, $confirmation is an array and was never returned. I think my brain was just tired from looking at this for so long. Anyways, here’s what I did to fix it. add_filter(“gform_confirmation”, “confirm_change”, 10, 4); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)