• Resolved felix997

    (@felix997)


    Hey Guys,

    is it possible to add a calculated Pin-Code? We have a pre populated field with the booking reference and to finish the form the guest has to type in a pin code. At the moment it is a number field with min/max, but I would like to have an individual code for each reservation. So my plan would be to calculated a code based on the booking number (such as booking no * 2) and the guest has to add this number to complete the form. He gets the number from us.

    Does anybody have an idea how it works?

    Best regards from Germany ??
    Felix

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support Williams – WPMU DEV Support

    (@wpmudev-support8)

    Hi @felix997

    I hope you’re well today!

    Currently there’s no such feature built-in but it may be doable, I think.

    Whether it can be done with some “configuration tricks” or would require some additional code – that depends on how it should work exactly so let me ask for some additional information then.

    1. I understand that the pin code is individual and unique and it is delivered to user by you

    2. but you also mentioned “calculating” it – so that should be “calculated on the fly” by the form? I mean – if you want to deliver the code to the user, it should already be somehow “pre-defined” if I’m correctly getting it so form would either need to read it from “somewhere” (like some custom post meta or other DB field) or it would have to be calculated with a “static” forumla but based on “known” factors that you can “predict” for a given user… So I’m a bit unsure where exactly this pin should come from?

    3. aside from above – if form is to expect specific, unique PIN code for a given user, it would need to “know” who is submitting it so I suppose you would either need to allow form only for logged-in users or users should have somehow “individually customized” form, right?

    3. ultimately – if the pin provided by member doesn’t match the one particular form is expecting, it would suffice to just disable submit button or issue a validation error, right?

    Or am I “overthinking” that?

    Please explain it a bit more and we’ll look into it to see if we can come up with a reasonable solution.

    Best regards,
    Adam

    Thread Starter felix997

    (@felix997)

    Hey Adam,

    thanks for your quick reply. We have added the form to our guest app. It is on an empty page on our website and this site is integrated in our guest app. The information are sent to the form via the URL. The booking number are sent to a hidden field with a pre filled option. My plan would be to take this number, multiplied it with an other number and that’s the code. So very easy to us to “create” the code for the guest.
    I’m looking for the option to add a number field and check on it “is the number correct, you can go the next page”. At the moment I have a number field with the Min / Max range as a limitation. So minimum is the code, maximum is the code +1. But everyone has the same and today I had the problem, that a guest had both codes and avoided the payment.

    Probably it will work with a mandatory field, e.g text field. If the number is incorrect it is shown. But it is hidden by a CSS script. So the system is requesting an input, but the guest can not add anything because it is not visible. Not sure if this could work… or do you have a better solution?

    best regards

    Felix

    Thread Starter felix997

    (@felix997)

    Dear Adam,

    I’ve just tried my idea from the last posting. As long as I don’t add any radio button, it is working fine. Once I’ve added it, it does not work anymore. Most probably I mix something up with the visibility.

    I’ve uploaded my “test form” to google drive. Probalby you or anybody else can have a look on it.

    Here is the link:

    https://drive.google.com/drive/folders/1W8P5beXBsdX0bj8nE9ZT5dvcS6v2mg8V?usp=sharing

    Thanks for your help!

    Felix

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @felix997,

    As long as I don’t add any radio button, it is working fine. Once I’ve added it, it does not work anymore.?

    I’m afraid, could you please explain further about what exactly isn’t working with the Radio button?

    I could notice currently you have the “Credit” and “No Credit card” options added as Radio fields and the calculations are working fine when tested for the “Calculation Code” Field and “Calculation after PIN”.

    Could you please check and advise if I’m missing out anything so that we could assist further?

    Looking forward to your response.

    Best Regards,

    Nithin

    Thread Starter felix997

    (@felix997)

    Hi Nithin,

    Thank you very much for your quick response.

    Currently, we are using Forminator for the online check-in in our vacation homes. Guests can also book various additional services and provide their credit card for the deposit. However, sometimes there are guests who do not have a credit card. For these guests, we offer the option to pay the deposit and additional services on invoice, which they can unlock with a PIN provided by us. To solve this, I have set up the PIN prompt to appear only when the guest selects “no credit” from the radio button. Then, a number field appears with a minimum/maximum function that only accepts the PIN.

    I recently encountered a problem when a guest checked in who had both codes (for the deposit and additional services – both have different codes) without ever having been in contact with us before. I do not know how they obtained the codes. Therefore, I had the idea of not assigning the codes anymore but calculating them instead based on the booking number (which is passed along via the URL). Our entire online check-in process is integrated into our guest portal, so the guest has no way of changing the URL.

    If the input in the PIN field is incorrect or the field is left blank, the guest should not be able to proceed to the next page. Therefore, I thought of using the “visibility” function to display a text field as a required field if the PIN is incorrect or the field is left blank, but not allowing the guest to make an entry here, as I always hide this field using CSS. As a rule, I have set that if the field “Calculation after PIN” is 1 (and thus the correct code has been entered), the text field is hidden using the “visibility” function and is no longer a required field. For all other values, it should be displayed, but it is not shown because it is disabled in CSS.

    However, the problem now is that the text field does not disappear when the correct PIN is entered. The calculation works correctly, but I seem to have made an error in the “visibility” function. I have also set up a test version of the form on my website: https://mein-seepark.de/test/?booking=10

    My question is: what do I need to set up so that the text field disappears when the link and PIN are set to 10? I have not yet integrated the CSS because I cannot test it otherwise.

    I hope it is clearer now what I am trying to do and need…

    Best regards from Germany, Felix

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @felix997

    Thank you for the information.

    ” However, the problem now is that the text field does not disappear when the correct PIN is entered. The calculation works correctly, but I seem to have made an error in the “visibility” function. I have also set up a test version of the form on my website:?https://mein-seepark.de/test/?booking=10

    This indeed is a bit weird, It sounds possible bug and I don’t think CSS would be the best solution here.

    I pinged our developers to verify why it is happening.

    Allow also to jump in the PIN validation, from what I see you are looking to validate this on the fly but as this renders on the front end if we hide for example with CSS the customer with more skill could easily check the source code and maybe bypass any validation.

    Forminator does have some interesting hooks that can help us to validate or even generate a code after submission that you would send to the user by email, so on checking they need to validate both, PIN + Code.

    Maybe a validation on submission would be a better idea? For example, validation, if that PIN was never used before.

    We will keep you posted about text field.
    Best Regards
    Patrick Freitas

    Thread Starter felix997

    (@felix997)

    Hello Patrick,

    Thank you very much for the quick response and for forwarding it to the developers. I have been desperate myself ??

    That is a cool idea with the validation. How does it work? How do I set it up? I haven’t found anything on this.

    Best regards
    Felix

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @felix997

    Could you let us know what you would have in mind for the validation?

    There are different ways to do it and validate it so we can know exactly what you would be thinking and we will be on the same page.

    A similar approach was used here https://gist.github.com/patrickfreitasdev/f654bc92cc4ba5426454a763d1145115 it submits only with the entered data match specific codes, but that could be extended to make your math after submission and fail in case it doesn’t result on what you are looking for.

    Another possible solution would be generating a “password” after the form submission, there is this code created by our developers https://gist.github.com/wpmudev-sls/e3e4655e9ad74686051393a1d0ed5ffa it creates a unique ID after submission so your customer would need to have the PIN + Unique ID to be able to pay later.

    The main issue with this is the ID is generated after submission.

    Best Regards
    Patrick Freitas

    Plugin Support Nithin – WPMU DEV Support

    (@wpmudevsupport11)

    Hi @felix997,

    Could you please check and see whether the visibility condition as shown in the following screenshot helps?

    Screenshot at 13:22:22.png

    I hope this helps in moving forward.

    Kind Regards,

    Nithin

    Thread Starter felix997

    (@felix997)

    Hey Patrick & Nithin

    thank you very much for all your support! I really appreciate it.

    I will have a deeper look into Patricks solutions next week. This week I’m very busy at work.

    I’ve just tried Nithins solution. Unfortunately it does not work. When I select ?no credit“ it works. But if I select Credit card, the text field is still there. Based on you idea, I’m trying to work with a calculation field more for the credit card, so hopefully this will work.

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @felix997 ,

    We haven’t heard from you for over 2 weeks now, so it looks like you no longer need our assistance.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Pincode…’ is closed to new replies.