0
votes

I am trying to insert Email Address in podio Email Field, First I was using text field and set email in text field, but i want to use podio email field for this i created podio email field in podio template but it requires 2 parameters to be inserted.

"email": [{ "type": "other|home|work", "value": "[email protected]" }, ...]

can anyone tell me that how I can implement it in my code. When I was using text field of podio and put email address in this podio gave me json like this "email": "sample_value" so I easily inserted in this field. But as I want to use podio email field to insert email address through my website I need some help. I am attaching code which I used for normal text field and insert email there but I need some help and code to put it in specific email filed of podio.

public function podioUserCreate($userData,$pakageID){ 

        $email=$userData['user_email']; 

        $items= PodioItem::create($app_id, array('fields' => array(
        "email" => $email

        )));
        }

This code is working on podio text field but I want to implement it in podio email field can anyone help and change some code and implement it to solve my problem. Thank you

1

1 Answers

0
votes

you need especified de type of email.

try

public function podioUserCreate($userData,$pakageID, $type='work'){ 

    $email=$userData['user_email']; 

    $items= PodioItem::create($app_id, array('fields' => array(
    "email" => array('value' => $email,'type' => $type)

    )));
}

regads