Need Assistance with Conditional Display in Hoteldruid Templates

Discuss here how to configure hoteldruid and better use its features.

Moderator: marco

Post Reply
Niko18
Posts: 35
Joined: Wed Jun 11, 2014 8:15 am

Need Assistance with Conditional Display in Hoteldruid Templates

Post by Niko18 »

Hello,

I am currently developing a reservation form template in Hoteldruid, and I've encountered a problem I can't seem to solve.

In my template, I have a field called "Company" that is linked to the variable [certificado_identificacion_fiscal]. I want this field to be displayed only when the variable [certificado_identificacion_fiscal] has a value - in other words, only when the reservation is actually associated with a company.

I tried to implement this with a conditional statement, but I couldn't find a built-in Hoteldruid method to hide or show elements based on their value. I've seen some examples of a hideElementIfValueIsZero() function being used in other templates, but it doesn't seem to work in my case.

Here is the relevant part of my code:


Code: Select all

<tr>
<td>EMPRESA</td><td>[certificado_identificacion_fiscal]</td></tr>
[/b]

And the attempted conditional:


Code: Select all

[c certificado_identificacion_fiscal != "0"]
  hideElementIfValueIsZero("empresa", "[certificado_identificacion_fiscal]");
[/c]
[/b]

image reference:
https://imgur.com/oPafTJA
Could anyone guide me on how to achieve this in Hoteldruid? Any help would be greatly appreciated!

Best regards,
Niko
Niko18
Posts: 35
Joined: Wed Jun 11, 2014 8:15 am

Re: Need Assistance with Conditional Display in Hoteldruid Templates

Post by Niko18 »

Nvm solved.
Thanks
Niko
Post Reply