Restricting product quantity field to numbers only in Gravity Forms

The increment arrows are inherent in <input type=”number”>, your browser automatically adds them. When you’re setting up your form you just use the ‘number’ input rather than a ‘text’ input. So instead of <input type=”text” id=”field_id” name=”field_name” value=”” />, what you want to use is something akin to: <input type=”number” id=”field_id” name=”field_name” value=”” step=”1″/> You … Read more

Having a Function Inside of the Loop

Before continuing, please read this: http://www.slideshare.net/andrewnacin/you-dont-know-query-wordcamp-netherlands-2012 It’s by a core WordPress developer and you should consider it required reading. You should never use query_posts, and it’s important to understand how to use loops correctly. That presentation will demonstrate the best practices, how, and why to use them. I can see the approach you’ve taken, what … Read more

Form Object Gravity Forms [closed]

According to this page about the form fields object, it looks like you’d need to do something like this: $my_id = ’37’; foreach($form[‘fields’] as $field){ if($field[‘id’] == $my_id){ $field[‘content’] = ‘This is a html-block’; } } where $my_id is the id of the field you are targeting

Gravity Forms plugin: How to use “gform_editor_js” action hook? [closed]

You can either place the code snippet in the theme functions.php file or in a custom functionality plugin: http://justintadlock.com/archives/2011/02/02/creating-a-custom-functions-plugin-for-end-users Edit: To enqueue custom scripts on the edit page you should use admin_enqueue_scripts e.g. add_action( ‘admin_enqueue_scripts’, ‘my_jquery_function’ ); function my_jquery_function() { if ( rgget( ‘page’ ) != ‘gf_edit_forms’ ) return; wp_enqueue_script(‘mytest1’, get_stylesheet_directory_uri() . ‘/assets/javascripts/mytest1.js’); wp_enqueue_script(‘mytest2’, get_stylesheet_directory_uri() … Read more

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