By icarusv2x on
Hello
I have been looking all over for how to inject my custom text into a form but I didn't find anything, what I want to do is this:
I have a form let's say
function my_settings($form_state){
which usually has in it the regular form structure
$form['somevar] = array('#type' => 'radios" etc.
but I want to insert at the op of the form page my custom echo of a file list now if I make it and then output the result using an echo before the $form['somevar'] it will display my list in the top right corner of the page instead of just adding it to the form. How can I insert it into the form rectangle so it won't spill out all over the page?
Comments
theme function
Create a theme function that corresponds with the form function name.
Create a module called
Create a module called mymodule.
In it use this code:
Contact me to contract me for D7 -> D10/11 migrations.
Thanks it worked
I tried with the '#value' => and it worked just fine I didn't even have to use form_alter hook so now I can build my list and also save it since it's part of the form. Thanks again.
Ahh, I didn't realize you had
Ahh, I didn't realize you had control of the original form definition as well.
Contact me to contract me for D7 -> D10/11 migrations.