User Tools

Site Tools


fieldcomponent_class

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
fieldcomponent_class [2021/10/08 21:31] sahlfieldcomponent_class [2022/11/30 13:22] (current) – [Adding the component to the form] sahl
Line 58: Line 58:
  
 // $componentfield can now be added to a form // $componentfield can now be added to a form
 +</code>
 +
 +For convenience the form also have an addComponent-function that does exactly the same as above in one line:
 +
 +<code php>
 +$textcomponent = new TextComponent();
 +$form->addComponent('Label for field', 'field_name', $textcomponent);
 </code> </code>
  
fieldcomponent_class.1633728676.txt.gz · Last modified: 2021/10/08 21:31 by sahl

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki