• Resolved felix997

    (@felix997)


    Hey there,

    is there any chance to hide a pre populated number field? I`m using Forminator for an online check-in and I need the number of nights for a calculation. At the moment the guest can change the number of nights and so the calculation would go wrong.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Kris – WPMU DEV Support

    (@wpmudevsupport13)

    Hi @felix997

    I hope you are doing well today.

    Just to be sure, we are on the same page, you allow to choose the number of nights on page 1, and you pre-populate that on page 2 in the number field as well and that allows you to change the number again, and that part you would like to block?

    Kind Regards,
    Kris

    Thread Starter felix997

    (@felix997)

    Hey Kris,

    thank you very much for your quick reply.
    I‘m using the pre population via the URL. So on page 1 the number of nights will be pre populated by the URL which is added to our guest app. So the guest can not change it easily.
    If the guest book an additional service which is charged by night, I‘m using the field on page 1 for the calculation.
    The field on page 1 can be changed any time by the guest and I would like to avoid it. So the best would be to block or hide it. But I need the value for the calculation.

    best regards

    Felix

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @felix997

    I hope you are doing well.

    You can use the query string on hidden field https://monosnap.com/file/PnajC0uyBHABk1MfK6VFMP90RxTowc and then use a calculation like:

    ( {hidden-1} ) + 10

    But this can easily break the form if for some reason a string is passed instead a number, a better solution would be using the number field itself with pre populate feature and then use a CSS to hide the field.

    You can add a custom class then .class{ display:none; } for that.

    https://wpmudev.com/docs/wpmu-dev-plugins/forminator/#additional-css-classes

    Best Regards

    Patrick Freitas

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    Hello @felix997 ,

    We haven’t heard from you for some time now, so it looks like you don’t require our further assistance.

    Feel free to re-open this ticket if needed.

    Kind regards
    Kasia

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘hidden number field for calculation’ is closed to new replies.