_form.phtml build custom using functionality of original

Discussion in 'Templates customization' started by Benoats, Aug 17, 2016.

  1. Benoats

    Benoats New Member

    Joined:
    Jun 16, 2016
    Messages:
    2
    Hey, Ok so ive made a new _form.phtml called _form-2016.phtml, within this is


    Code:
    <?php
    /**
    * To improve readability, form template is made as class
    * in your template you can extend it or implement it completely
    * another way (not recommended :) )
    */
    /* @var $form Am_Form */
    $renderer = new Am_Form_Renderer_User();
    // you can customize form output - for example
    // $renderer->setTemplateForClass('html_quickform2_container_fieldset', '<fieldset{attributes}><qf:label><legend id="{id}-legend">&nbsp;&nbsp;{label}</legend></qf:label>{content}</fieldset>');
    
    /* @var $renderer HTML_QuickForm2_Renderer_Default */
    echo $form->render($renderer);

    I would like to edit some of the fields in the original form more specific the coupon filed.
    What is the best way of doing this ?
    Thanks.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Can you tell me what do you need to edit exactly? Do you need to change field label? Or field functionality?
  3. Benoats

    Benoats New Member

    Joined:
    Jun 16, 2016
    Messages:
    2
    Hi Alexander,

    Thanks for your replay.

    I need to custom build a full form page, the full works i need to build a template with JS applied to the fields (blocks) and to have control over where the blocks are positioned .
  4. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279

Share This Page