Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

17480 Posts in 4474 Topics by 1973 members

Archive

SilverStripe Forums » Archive » Form Fields

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

Page: 1
Go to End
Author Topic: Form Fields 299 Views
  • tomato
    avatar
    Community Member
    4 posts

    Form Fields Link to this post

    Hi
    I need to add a field to a product order form which editable by the user. To add extra detail about the product being bought. ie what colour is wanted.
    Not quite sure how to adapt this and where to put it
    class MyCustomRole extends DataObjectDecorator {
       function augmentEcommerceFields(&$fields) {
          // Returning users shouldn't be shown phone / email fields
          if($this-owner->ID) {
             $fields->removeByName('HomePhone');
             $fields->removeByName('MobilePhone');
             $fields->removeByName('Email');
          }

       }
    }
    Thanks in advance

    299 Views
Page: 1
Go to Top

Currently Online: Android08, alirobe

Welcome to our latest member: AlfonsoGrondo

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

Comments on this website? Please give feedback.