Adding auto-complete to custom gravity field not working

I have solved my problem using below code.So may be helpful for someone.I have tried by reference style for autocomplete <script> var locations=”<?php echo $json;?>”; var locations_array = JSON.parse(locations); locations_array.sort(); function monkeyPatchAutocomplete2() { jQuery(“#result”).remove(); // Don’t really need to save the old fn, // but I could chain if I wanted to var oldFn = … Read more

Pass MD5 value to prepopulate field

Finally found the solution (I’ve been working on this for 2 days) add_filter(“gform_field_value_editlink”, “get_editlink”); function get_editlink(){ $current_user = wp_get_current_user(); $user_login = $current_user->user_login; $user_email = $current_user->user_email; $editlink = md5($user_login . $user_email); return $editlink; }

Gravity forms – get shortcode attribute from post content

If you only have 1 shortcode in the post content, catch the id with this: <?php $text = get_the_content(); preg_match_all(“\bid=”([0-9]+)\b”, $text, $matches); var_dump($matches[0]); ?> In your example [gravityform description=”true” id=”23″ title=”true”], it would output: 23 However, if you use other shortcodes or simple text, in the same post, with that same structure id=123, you might … Read more

trying to determine if meta value exists for user and if not auto submit gravity form to redirect

Your <?php/?> tags are aligned such that none of your actual PHP code is being interpreted as PHP code (except the is_page (‘1150′) conditional) – it’s actually just printing it all into your markup, including the <script> element. So since it’s not running the logic to check the user or the user meta-data, the script … Read more

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