简体   繁体   English

Podio PHP电子邮件字段(类别)(项目类型)

[英]Podio PHP Email Field (Category) (Item Type)

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. 我正在尝试在podio电子邮件字段中插入电子邮件地址,首先我使用文本字段并在文本字段中设置电子邮件,但我想使用podio电子邮件字段为此我在podio模板中创建的podio电子邮件字段但它需要2个参数插入。

"email": [{ "type": "other|home|work", "value": "mail@example.com" }, ...] “email”:[{“type”:“other | home | work”,“value”:“mail@example.com”},...]

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. 当我使用podio的文本字段并把电子邮件地址放在这个podio给了我这样的“电子邮件” json :“sample_value”所以我很容易插入这个领域。 But as I want to use podio email field to insert email address through my website I need some help. 但是,由于我想使用podio电子邮件字段通过我的网站插入电子邮件地址,我需要一些帮助。 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. 我附加了我用于普通文本字段的代码并在那里插入电子邮件但我需要一些帮助和代码将它放在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. 此代码正在处理podio文本字段,但我想在podio电子邮件字段中实现它可以任何人帮助和更改一些代码并实现它来解决我的问题。 Thank you 谢谢

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 regads

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM