Adding multiple user roles dynamically
Adding multiple user roles dynamically
Adding multiple user roles dynamically
The following provides you with a file upload: add_filter(“gform_column_input_content_21_9_3”, “change_column3_content”, 10, 6); function change_column3_content($input, $input_info, $field, $text, $value, $form_id) { $input_field_name=”input_” . $field[“id”] . ‘[]’; $tabindex = GFCommon::get_tabindex(); $new_input=”<input type=”file” name=”” . $input_field_name . ‘” ‘ . $tabindex . ‘ class=”YOUR-CSS-CLASSES” />’; return $new_input; } But what does ‘repeatable’ mean in this context? Do you … Read more
I think I found the answer on another forum discussing using Contact Form7, with the same issue I was having. This is what I got from that thread and tried. It does appear to work and does appear to be only targeting email from the default ‘WordPress’ sender name/email. // Change default WP email sender … Read more
Just thinking on a Friday night (so untested), but: You are outputing the result directly to the page. Of course it is going to display straight after the body tag. What you need to do is store that HTML snippet, and append/insert into the content using the_content filter as s_ha_dum suggested. This is untested, and … Read more
If you look at the codex entry for add_filter, you’ll see there are 4 arguments for the function, the last being $accepted_args, which should be an integer. Your add_filter calls are not correct, so I’m not sure how they worked in the first place. There appear to be 5 arguments in your hooked function, so … Read more
You can accomplish what you’re after by first creating a hidden field in your form. Set the value to the current embed page: Take note of the hidden fields ID, for this demo, it’s 3. Then your code for the content is similar to what you had: add_action( ‘the_content’, function ($content) { // check if … Read more
Set the query string to p={post_id}. WordPress will redirect it to the proper URI then automatically.
With the help of smspaulb’s link, brandozz has solved the issue by adding the following filter which defers the loading of the GravityForms script to the footer: add_filter(‘gform_init_scripts_footer’, ‘__return_true’);
My situation to tackle this problem was a bit problematic because I wanted to use the GF Update Post plugin to let my users edit their post right after they submitted the content. With the above solution ACF does not write to the db and correct ACF fields (at least not for me). My solution: … Read more
If you have the form/field object you can retrieve a comma separated string containing the fields selected choices by using the GF_Field::get_value_export() method which was added in Gravity Forms 1.9.13. If you are only going to use it with one or two fields you could do something like this: $field_id = 4; $field = GFFormsModel::get_field( … Read more