Custom rules for custom form

Question:

Hi guys, I have been creating a custom form and I need to insert a condition by using Velo.
“Accommodation type” > there are several accommodation types. Only Hotels use Accommodation ratings (stars). Others have no rating scale.
So, the “Accommodation rating” field should be hidden unless someone picks a “Hotel” as their choice in the “accommodation type” field.
At that moment I need to show the “Accommodation rating” field.
How do I write the condition, please?

I have another similar scenario on that form but this time it is multi-choice. You have three choices, if you click on one a new field will be shown, if you click on two choices then two new fields will be shown.
How do I write the condition here, please?

Thank you guys!

Product:
Wix editor

What are you trying to achieve:
I want to create custom rules for my custom form.

What have you already tried:
FB groups

Custom form screen

image

You will need…

  1. …to write some if-else-conditions …
if(.......) {......}
else {.........}
  1. and you will need …
    custom validation
    onCustomValidation - Velo API Reference - Wix.com
    …maybe…

  2. last one… —> valid <— checking if input is valid