Pre populate select field

This topic contains 5 reply and 2 voices, and was last updated by obouilland 10 years, 11 months ago
Viewing 5 Posts - 1 through 5 (of 5 total)
Author Posts
May 14, 2013 at 12:17 pm 3602
obouilland Hi. I have a function that return an array of value/text. I want to use it to pre populate a select field in a form. Which hook can I use, and how can I reach a specific select box in my form ? Thank you by advance, Olivier
May 14, 2013 at 3:58 pm 3614
Tareq Hasan Tareq Hasan

You can use the Action Hook field I think. That field has a example code, you can display your form in that function. Check the developer docs.

May 14, 2013 at 8:08 pm 3629
obouilland obouilland

Hi tareq.

I have already seen the developer docs, but I cannot see an example of how to use it, and there is no documentation on how to reach a field. Can you develop your documentation on it ?

Thanks.

May 14, 2013 at 8:36 pm 3631
Tareq Hasan Tareq Hasan

I have updated the docs with an example action hook field code. Take a look.

May 14, 2013 at 8:44 pm 3632
obouilland obouilland

Thanks Tareq, I will have a look at this example.

May 16, 2013 at 3:15 pm 3702
obouilland obouilland

Thank you Tareq, great example, works perfectly for me. Just one thing : the hook field don’t appear in the admin section (in the wpuf custom field list of a node). It is not an issue to me, but it will be better if it could appear.

Thanks again.

Olivier

Viewing 5 Posts - 1 through 5 (of 5 total)