Post

2 followers Follow
0
Avatar

how to use PodioContact::get( $profile_ids, $attributes = array() );

Hi guys,

it's the first time i use API podio so i need some help please ^^

I want to know  how to use this function " PodioContact::get( $profile_ids, $attributes = array() );" .

I tried to use :

$contact = PodioContact::get( $profile_ids, $attributes = array() ); 

echo "<pre>";

print_r($contact);

echo "</pre>";

I want only to show all ids of my contacts but i have this problem and i don't why... :/  

I look forward to your response :)

Ravi Answered

Please sign in to leave a comment.

12 comments

0
Avatar

Hi Ravi,

I'm afraid I don't understand you sentence. What do you mean by "when i want to show a user name when is loged"?

All the best,

Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Hi Ravi,

In that case you'll need to host the webform on your own server. You get embed code when you save your webform. Paste that into your own website to display the webform there and then you control all the suurounding space yourself.

All the best,

Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Hi Ravi,

Webforms are specifically made to be used outside of Podio so you do not have access to the current user's name while displaying a webform. You have a couple of options:

* Give the users access to the app in Podio where they can fill out the usual create item form

* Don't use webforms and create your own custom form using the API (programming experience is required)

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

I'm trying to use:

$profile_id = '158410695';
$contact = PodioContact::get($profile_id);

This return a error:
"Warning: array_merge(): Argument #1 is not an array in /home/.../public_html/.../PodioObject.php on line 187"

if i print_r($contact), this return:

"[0] => PodioContact Object
(
[__attributes:PodioObject:private] => Array
(
)

        [__belongs_to:PodioObject:private] => 
        [__properties:PodioObject:private] => Array
            (
                [profile_id] => Array
                    (
                        [type] => integer
                        [options] => Array
                            (
                            )

                    )

                [user_id] => Array
                    (
                        [type] => int

...."

What is wrong?

Lincoln Lemos 0 votes