Jump to:

2084 Posts in 1005 Topics by 453 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Checking if user did not fill out all required fields.

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 482 Views
  • JcFerggy
    Avatar
    Community Member
    2 Posts

    Checking if user did not fill out all required fields. Link to this post

    Posted this in the wrong section at first.

    On the checkout page of a Ecommerse site, I have 2 large buttons, one if the customer is a new user, the other if the customer is returning and already has an account.

    When a button is clicked, the buttons disapear, and the fields slide out below. The problem is that if the user does not fill out all the required fields and is redirected back to the page, the 2 main buttons are there again. After clicking the button though, I do see the form with the notices that say I need to fill out all required fields.

    I have tried getting the post, checking if submit was pressed, but I submit is not being passed with the post. I also tried checking if any of the forums were set (Like Country, which is a dropdown and would always be set), but no luck there.

    Is there a way to just check if a form has failed validation, so I can automatically show the menu?

  • Jedateach
    Avatar
    Forum Moderator
    227 Posts

    Re: Checking if user did not fill out all required fields. Link to this post

    Perhaps try checking if $form->Message contains something?

    482 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.