Viewing 8 Topics - 16 through 23 (of 23 total)
Author Posts
April 24, 2013 at 7:49 am 2805
NudeWeb NudeWeb

Yes the page has reCaptcha. How can I solve this conflict. 

April 24, 2013 at 8:05 am 2806
Tareq Hasan Tareq Hasan

The contact page template in Avada has this code
[php]
if($data[‘recaptcha_public’] && $data[‘recaptcha_private’]) {
require_once(‘framework/recaptchalib.php’);
}
[/php]

Remove this code from that page.

April 24, 2013 at 10:46 am 2816
NudeWeb NudeWeb

Thank you. The contacts page is OK now. I added the code below to functions.php but I don’t see the custom field in edit forms.

function wpufe_insert_recipe( $post_id ) {
    if ( isset( $_POST['recipe'] ) ) {
        $items = get_post_meta( $post_id'recipe' );
        $ingredients array();
        if $items ) {
            foreach ($items as $key => $item) {
                $values explode'| '$item );
                $ingredients[] = array(
                    'quantity' => $values[0],
                    'notes' => $values[1]
                );
            }
        }
        update_post_meta( $post_id'_recipe_ingredient_value'$ingredients );
    }
}
add_action( 'wpuf_add_post_after_insert''wpufe_insert_recipe' );

 

 

April 24, 2013 at 10:54 am 2818
Tareq Hasan Tareq Hasan

The code is not for showing custom fields in the form. Read here again. It’s a hack to transform the multicolumn repeatable fields value to the recipe format of that plugin.

April 24, 2013 at 11:08 am 2821
NudeWeb NudeWeb

Please give a little more detail how to do this. I am lost how to do it.

April 24, 2013 at 11:22 am 2823
Tareq Hasan Tareq Hasan

You need to add repeat field in the form editor like this:

repeatable fields

Now that code will now for this field.

April 24, 2013 at 11:35 am 2829
NudeWeb NudeWeb

Thank you. I have done as you said but the function does not add to the ingredients it only adds test to the end of post.

April 24, 2013 at 8:54 pm 2841
Tareq Hasan Tareq Hasan

I gave you example code that how you should proceed. I can’t give you full integration help right now.

Viewing 8 Topics - 16 through 23 (of 23 total)