#AlexElba
1 messages · Page 1 of 1 (latest)
custom_fields is an array of hashes
So it need to be an array first, then one memeber is a hash with dropdown
not sure what that will look like - I tried this does not work 'custom_fields' => [[ 'dropdown' =>
[
'label' => 'Investment Focus',
'key' => 'investment_focus',
'type' => 'dropdown',
'options' => [['label'=>'Realtor', 'value'=>'realtor'], ['label'=>'XXX', 'value'=> 'YYYY']],
'optional' => true,
],
]],
gives array key missing
Okie PHP question: How do you define an array of objects?
I think it's not [[
array(['dropdown' => ....], [...])
hmm you can choose PHP here actually
'custom_fields' => [
[
'key' => 'engraving',
'label' => [
'type' => 'custom',
'custom' => 'Personalized engraving',
],
'type' => 'text',
],
],
umm it looks similar
can you try to copy-paste the code first to see if it works? before swithing to dropdown
thanks I think it worked here is final version
'custom_fields' => [
[
'key' => 'investmentfocus',
'label' => [
'type' => 'custom',
'custom' => 'Investment Focus',
],
'type' => 'dropdown',
'dropdown'=> ['options' => [['XX'=>'TT']]
],
],
ah okie dropdown is same level with key or label