0
私はこのアイテム持ってアクションのラジオボタン入力に応じて、
$sales_payload = array(
'organization_id' => $organization_id,
'contact_id' => $contact_id,
'status' => 'Open',
'subject' => $_product->post_title." ".str_replace($strToRemove, "", $_POST['billing_myfield12']),
'start_date' => date("Y-m-d"), // set start date on today
'expected_closing_date' => date("Y-m-d",strtotime(date("Y-m-d")."+ 14 days")), // set expected closing date 2 weeks from now
'chance_to_score' => '10%',
'expected_revenue' => 0, //set the expected revenue
'note' => $_POST['order_comments'],
'progress' => array(
'id'=>'salesprogress:200a53bf6d2bbbfe' //fill a valid salesprogress id to set proper sales progress
),
"custom_fields"=> [["actief_in_duitsland"=>1]]
);
を、私は2つのラジオボタンがあります。今、私が達成したいものを
<div class="form-row form-row-wide " id="billing_myfield13_field">
<fieldset><legend>Bent u actief in Duitsland?</legend>
<label><input type="radio" checked='checked' name="billing_myfield13" value="Ja"/> Ja</label>
<label><input type="radio" name="billing_myfield13" value="nee" /> nee</label>
</fieldset>
</div>
を'ja'を含むラジオボタンがチェックされているときは、この配列の値は1でなければなりません。
"custom_fields"=> [["actief_in_duitsland"=>1]]
他
または値「旧姓」:
"custom_fields"=> [["actief_in_duitsland"=>0]]
私はどこにでも探していると私は特定の答えを見つけるcouldntの。私は例を得ることができますか、私は正しい方向につながる何かのように。事前に
おかげで、
ケビン
予想外の '{' >>>>であれば(!空($ _ POST [ 'billing_myfield13'])&& $ _POST [ 'billing_myfield13'] === 'ja'){ –
が更新されました。 –
aha!素晴らしい、感謝の仕事! –