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>
And the attempted conditional:
Code: Select all
[c certificado_identificacion_fiscal != "0"]
hideElementIfValueIsZero("empresa", "[certificado_identificacion_fiscal]");
[/c]
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