Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » UserDefined Form - Alternate Template

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 948 Views
  • Garrett
    Avatar
    Community Member
    245 Posts

    UserDefined Form - Alternate Template Link to this post

    Hi,

    I need a separate TEMPLATE for my form; I.e.: other than Page.ss, for reasons too complicated and boring to go into. SO-- I have followed a forum member's advice and created a new pagetype ("ContactForm[.php]") which extends UserDefinedForm and rebuilt my database and change the pagetype to the new one. My form is all still there in the CMS so I know the extends is working fine.

    I also then created my ContactForm.ss template, and coded my special layout. The template is being accessed and used (showtemplate=1). So we're good there. However, for some very frustrating reason, the form I built inside the CMS is not showing up! Although $Content is benig picked up, $Form seems to have NO effect.

    What am I doing wrong?

    Thanks in advance,
    Garrett

    <?php
    class YourFormPageType extends UserDefinedForm {

    static $add_action = 'my page type';

    // Any other custom code

    ?>

    948 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.