Hello, WuFriends! As we close down our Valentine’s Day forms (hope yours was sweet) and begin building forms for St. Patrick’s Day (Shamrock Shuffle anyone?), you might be thinking about revisiting our Rule Builder. While it’s not all that complicated, there are some common rule building mistakes that you may encounter. Today we’re going to blaze through a few, and by the end you’ll be an expert Rule Builder yourself in no time.
Part 1: SHOW, don’t HIDE
Let’s say you’ve got a field in your form that needs to be shown in a number of different circumstances, but hidden in others. You might think that you need to set up a rule for the “show” scenarios, and a rule for the “hide” scenarios–but it’s simply not true. Just one rule will do the trick.
If you set up a condition to SHOW a field, it will only show if that condition is met. Say this is your form:
We only want to show the question about macarons if people choose macarons, right? So we set up a field rule to SHOW it:
And that’s all you need. Your users will only get to see the number of macarons if they actually choose macarons.
Part 2: Don’t double up
Now, we need to let folks choose how many dozens they need for cupcakes and apple turnovers. This is important: Make sure you don’t add a rule for both. If you do, the form might start acting funny, since rules are evaluated from top to bottom. There’s no way to satisfy both rules at the same time, so it’ll go with the bottom rule every time.
We’ll try to warn you not to use two rules for the same result, with an alarming little exclamation point on the two that conflict:
Click on one of the exclamations, and you’ll see a big scary red warning that lets you know there’s danger ahead:
When you see that, you’re not in trouble yet. Just delete rule #2, and now it’s time…to use two conditions in the SAME RULE. Like so:
And voila! No conflict–just smooth, conditioned sailing.
Part 3: Keep to the path
When you dive into the rules, you might find yourself losing track of what needs to happen when. For example, three macarons takes a week, six macarons takes two weeks, and nine macarons takes three weeks:
(I’m a really slow baker)
Set up to make sure users see the right message based on the number of macarons they choose.
I like to call this a “cascading rule” – if X happens, do Y. If Y = 3, do Z. Remember when I said that rules are evaluated from top to bottom? This also means you need to keep things in the proper order – X, Y, Z. If my rules start with Y, I’m going to run into trouble when it comes time to tell X what to do.
Just make sure your rules are listed in the order that things should be happening. X, Y, Z:
1, 2, 3:
The ordering process is smooth and simple–til they have to wait two weeks for half a dozen macarons. Promise you–I’m working on getting a better oven.
There you have it, form fans. Get started on building your rules and as always, give us a shout-out below with questions or comments.