Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Checking if user did not fill out all required fields.

Go to End

2 Posts   1311 Views


Community Member, 2 Posts

3 May 2011 at 1:42am

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?


Forum Moderator, 1899 Posts

3 May 2011 at 1:48am

Hi Jc,

Welcome to the forum :)

I do not know the answer myself, but I'd advise posting directly in the ecommerce section of the forum to get the fastest answer - hope you getsomething soon!