Nico Knoll Posted December 1, 2012 Share Posted December 1, 2012 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 More sharing options...
Martijn Geerts Posted December 1, 2012 Share Posted December 1, 2012 $f = $this->modules->get("InputfieldMarkup"); 1 Link to comment Share on other sites More sharing options...
Nico Knoll Posted December 1, 2012 Author Share Posted December 1, 2012 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now