Hello, I have a problem with the form editor : I have designed a signup form that I like, containing several product bricks, for the different categories of products that we offer (products, services, etc). The trouble is that if any of these are empty, the form doesn't display at all : instead, I get an error saying that there are no products to purchase at the moment. Is there any way I can get it to just hide empty product bricks instead ? Thanks in advance, Jonathan
You can change require behaviour for these bricks to 'Never' (configuration setting of brick) then it will be just removed from form if there is not suitable products to display in brick.
Hmm, but I don't want the users to be able to place an empty order, with neither products nor services. Is there a way to validate that? Even by hand in the PHP would be ok, but which file should I change?
You can use the following approach to add special validation to signup form without changes in core files http://www.amember.com/docs/How_to_add_special_validation_for_some_fields_on_signup_form
Wow, thanks a lot, I hadn't seen that! Where can I find the list of existing variables that I can retrieve from the $vars array?
You can add the following code print_rre($vars) and try to submit form. You will see dump of this array.
Ok, thanks for the information, I'll check that out. However, I just tried your suggestion, and my form still doesn't work : if I purchase all the products of one category (thus making one of my product bricks empty, but not the others), my form says there are no products to buy and won't let me order anything. I set all four of the product bricks to "never required", but it makes no difference. What am I doing wrong?