lisardo
lisardo

Reputation: 1454

prefill checkboxes in powermail via GET-Parameter or Typoscript

there is no problem to prefill normal fields, but i am not able to prefill one or more checkboxes neither with typoscript nor via GET-Parameter.

i tried:

GET-Parameter: 
&tx_powermail_pi1[field][marker][0]=1
&tx_powermail_pi1[field][marker][0]=1


Typoscript: 
marker = TEXT
marker.value = 1

marker.0 = TEXT
marker.0.value = 1

is there a passibility to prefill /preselect a checkbox?

Thanks!

Upvotes: 2

Views: 625

Answers (1)

lisardo
lisardo

Reputation: 1454

OK, i got it after analysing the PrefillMultiFieldViewHelper ... :-)

I changed the definition of the labels of my checkboxes in the flexbox:

Option|1
Other Option|2

Now i can prefill my checkboxes with:

&tx_powermail_pi1[field][marker][]=1&tx_powermail_pi1[field][marker][]=2

Easy when you got the logic behind it :-)

Sorry for the noise!

Upvotes: 2

Related Questions