Getresponse + Buddypress
-
Hi!, I try to integrate api in part registration with custom fields buddypress, but I can not make this save me the contact in the campaign that I need to give the fields to the API but seeing settings buddypress, I realized that if I have 2 textarea does not generate code 2 textarea, but one that I think is the array type, and throws.
<?php if ( 'number' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'vibe' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <input type="number" name="<?php bp_the_profile_field_input_name(); ?>" class="form_field" id="<?php bp_the_profile_field_input_name(); ?>" value="<?php bp_the_profile_field_edit_value(); ?>" /> <?php endif; ?> <?php if ( 'textarea' == bp_get_the_profile_field_type() ) : ?> <label for="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'vibe' ); ?><?php endif; ?></label> <?php do_action( bp_get_the_profile_field_errors_action() ); ?> <textarea rows="5" cols="40" name="<?php bp_the_profile_field_input_name(); ?>" id="<?php bp_the_profile_field_input_name(); ?>"><?php bp_the_profile_field_edit_value(); ?></textarea> <?php endif; ?>
And APIGETRESPONSE.php
$CAMPAIGN_ID = array_pop(array_keys($campaigns)); # add contact to the campaign $result = $client->add_contact( $api_key, array ( # identifier of 'test' campaign 'campaign' => $CAMPAIGN_ID, # basic info 'name' => 'Test', 'email' => 'test@test.test', # custom fields 'customs' => array( array( 'name' => 'field name', 'content' => 'field content' ), array( 'name' => 'field name', 'content' => 'field content' ) ) ) );
I need to spend the fields manually to the api so you know you add each field
Regards
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getresponse + Buddypress’ is closed to new replies.