How to add custom input via PHP into every Gravity Form? [closed]

Not a direct answer to your question but if the goal is anti-spam or anti-bot protection, simply use the built-in honeypot from Gravity Forms. https://www.gravityhelp.com/documentation/article/form-settings/ Otherwise, I believe you want the gform_pre_render hook. This is executed before the form is displayed and can be used to manipulate the form object directly. More info on Gravity … Read more

Gravity Forms merge tags in templates?

The ability to use Gravity Forms’ merge tags in your post content might be helpful to you here: http://gravitywiz.com/gravity-forms-post-content-merge-tags/ If you need more specific control, you can fetch an entry like so: $entry = GFAPI::get_entry( $entry_id ); And echo out a specific field’s value from that entry like so: echo $entry[1]; // replace “1” with … Read more

How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]

For anyone who needs help with this, here’s my solution. With the Gravity Forms hooks gform_pre_render, gform_pre_validation, gform_pre_submission_filter and gform_admin_pre_render I was able to populate the dropdown fields with dynamic data. Despite this is not too user friendly, we can define specific CSS classes to have this done and avoid populate fields that we don’t … Read more

Gravity Forms returns to odd position

I figured this one out, kind of… After looking through the code over and over again, it just didn’t make sense that a simple anchor link wasn’t working properly. So, I started disabling plugins one at a time and when I disabled my picture gallery the anchor links started working. I am still looking into … Read more

Gravity Forms custom Field entry

Yes, you are attempting to use the field key parameter which only means anything to ACF itself, it doesn’t mean anything to the actual connection between Gravity Forms and the Custom Field property. That’s what the field name is before. It’s usually the lowercase, underscored version of your field title. “Business phone” becomes business_phone usually. … Read more

Gravity Forum Custom Field Check box attribution

Ok Figured it out with a bit of tinkering with the above. Might not be ideal but it works. If someone has a better way of doing it please feel free to chip in explaining why its better 🙂 $gravity_form_id = ’10’; // Gravity Forms ID add_action(“gform_after_submission_$gravity_form_id”, “gravity_post_submission”, 10, 2); function gravity_post_submission ($entry, $form){ $post_id … Read more

ACF and Gravity Form file upload frontend [closed]

An even easier option is to use my Gravity Forms Media Library plugin. Here’s the meat and potatoes of the functionality: public function maybe_upload_to_media_library( $entry, $form ) { $has_change = false; foreach( $form[‘fields’] as $field ) { if( ! $this->is_applicable_field( $field ) ) { continue; } $value = $entry[ $field->id ]; if( $field->multipleFiles ) { … Read more

Gravity Forms – gform_field_value – query custom table breaks functions.php

Add this line, before using $wpdb: global $wpdb; In the line: $item_info = $wpdb->get_row(“SELECT * FROM fm_household WHERE k_RecordNum=’$id'”); in WHERE clause, k_RecordNum is being compared to ‘$id’ string, not to the string value of $id parameter. Change this line to: $item_info = $wpdb->get_row(“SELECT * FROM fm_household WHERE k_RecordNum='{$id}'”); It is very important to check, … Read more

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