• Resolved dibo68

    (@dibo68)


    Now I have the next problem. Restaurant reservation form: Is there a way to check the weekday for the reservation? Mondays we are closed and Sunday we have different opening hours. I cold not find anything about a solution in this forum.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    This type of validation is harder to do, i just added something to the plugin to make this easier. I haven’t release the update that has this change though so you can either wait for the plugin update (which i will try to release this week or next at most) or update the plugin using this version that already has the change: https://send.firefox.com/download/af8e3a4940/#i6lvC1S7uo6zBfSIRiJPLg

    After updating your copy with the latest version you will be able to do the validation like this:

    https://smartforms.rednao.com/doing-validations-using-the-day-of-the-week/

    Regards!

    I was just about to pay for the full version to see if it had this feature too. Once it does, I will be able to use it and replace my old, awful form tool. Any idea when this release will be available>

    I also need to be able to exclude certain dates like Holidays. Is there a way to do that?

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Yup both of them are possible, you need to do a custom validation like this:https://smartforms.rednao.com/doing-validations-using-the-day-of-the-week/

    Regards!

    I am testing on the Free version. Do I need to upgrade first?

    Plugin Author EDGARROJAS

    (@edgarrojas)

    You don’t need to upgrade. Conditional validations are supported in the free version.

    Regards!

    Ok, there’s a step missing in the instructions here:
    https://smartforms.rednao.com/doing-validations-using-the-day-of-the-week/
    After “Then you need to create a “Make field invalid depending on a condition”” It asks me which field I want to invalidate based on the formula. I choose “date”, is that correct?

    Also the doc switches between Get and Gat in the formula, I assume Get is the correct syntax, specifically [DATE].GetDayOfWeek()==0 to choose Sunday but when I click validate, it returns an error of “SyntaxError: Invalid or Unexpected Token” If I try it anyway, it doesn’t work. I still suspect this new code isn’t working in the version I have (Version 2.6.9) (Free). I’ll upgrade if this helps.

    Further, I wouldn’t know how to exclude a specific date from these instructions. like August 2, 2018 for example.

    Thanks for the help and direction.

    Plugin Author EDGARROJAS

    (@edgarrojas)

    ups sorry that was a typo. Yes Get is the right format. Regarding the syntaxerror your code probably is fine, the validator can’t understand this new type of validations yet (sorry for that) and that is why it is throwing that error. I am in the process of improving the validator so it can understand this and other more complex validations.

    Regarding “I wouldn’t know how to exclude a specific date from these instructions. like August 2, 2018 for example”. You just need to add that date in your validation.

    For example, if you want to not allow mondays and that particular date you will need a validation like this:

    $$field_rnField9$$.GetDayOfWeek()==1 || $$field_rnField9$$==’2018-08-02′

    In this validation if the user select any monday or August 2, 2018 the form will show an ‘Invalid Date’ message.

    In case you want you can download a form that use this example here: https://send.firefox.com/download/77abaab42f/#5aHj75Aj0kpgO8v-WmOTBQ

    Regards!

    Plugin Author EDGARROJAS

    (@edgarrojas)

    Also regarding: After “Then you need to create a “Make field invalid depending on a condition”” It asks me which field I want to invalidate based on the formula. I choose “date”, is that correct?

    Yup that is correct, you can select any field. When the validation is triggered the form will put a red border and a message below the field that you selected.

    Regards!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Date field – Conditional Logic – Weekday’ is closed to new replies.