Jump to content

Add div to InputfieldForm


Nico Knoll
 Share

Recommended Posts

Hi,

im writing a module and need a div to be in a form instead of an textarea. Is there a way?

My code:

$form = $this->modules->get("InputfieldForm"); 
$form->method = 'post'; 
//$form->description = "";

$f = $this->modules->get("InputfieldText"); 
$f->name = 'file_name';
$f->label = 'Name';
$f->attr('value', $filename); 

if($f->value == '"') $f->collapsed = Inputfield::collapsedNo;
$form->add($f); 

$f = $this->modules->get("InputfieldTextarea"); 
$f->name = 'file_content';
$f->label = 'Content';
$f->attr('rows', '30');
$f->description = "";
$f->collapsed = Inputfield::collapsedNo; 
$f->value = $filecontent;
$form->add($f); 

$f = $this->modules->get("InputfieldButton");
$f->type = 'submit';
$f->id = 'file_submit';
$f->value = 'Save template';
$form->add($f); 

return $form->render(); 
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...