1953
Views
17
Comments
Solved
Control the visibility of elements in the BookingDetail Screen
Question

hello,

 have a question about how to enable a Button and a label to be shown after the specific button was clicked?


this is what I require to do: 


a) Make sure that the line that displays the Room Number and the Room Price in the Form, is only displayed after clicking on the Get Available Room Button and successfully finding the cheapest Room available.

b) Make sure that the Book Room Button is only shown after clicking on the Get Available Room Button. 

Staff
Rank: #820
Solution

Hello,

The two tasks that you want to accomplish have a similar solution.

In the Button Book Room, you have a Visible property, that you can use to define a condition where the button is visible. 

When you click the Get Available Room Button, you get the cheapest available room. So, you can use that info in to set the Visible property accordingly, to display the button ONLY when you get an available room after you click the Button.

For the Room Number and the Room Price row, you can enclose that info in a Container and also take advantage of the Display property of the Container. It works in a similar fashion than the Visible property of the Button. 

There are different ways to solve this problem, so I will let you try to see if you can do it. Let us know if you need more help.

Best regards,

Jorge Costa


Rank: #12035

Ghada Alhadlaq wrote:

hello,

 have a question about how to enable a Button and a label to be shown after the specific button was clicked?


this is what I require to do: 


a) Make sure that the line that displays the Room Number and the Room Price in the Form, is only displayed after clicking on the Get Available Room Button and successfully finding the cheapest Room available.

b) Make sure that the Book Room Button is only shown after clicking on the Get Available Room Button. 

In the Booking Project

Assignment 5: Data Queries & Widgets

2. Control the visibility of elements in the BookingDetail Screen


Staff
Rank: #820
Solution

Hello,

The two tasks that you want to accomplish have a similar solution.

In the Button Book Room, you have a Visible property, that you can use to define a condition where the button is visible. 

When you click the Get Available Room Button, you get the cheapest available room. So, you can use that info in to set the Visible property accordingly, to display the button ONLY when you get an available room after you click the Button.

For the Room Number and the Room Price row, you can enclose that info in a Container and also take advantage of the Display property of the Container. It works in a similar fashion than the Visible property of the Button. 

There are different ways to solve this problem, so I will let you try to see if you can do it. Let us know if you need more help.

Best regards,

Jorge Costa


Rank: #428

hi Ghada,

Do not use that visibility property as a browser can change its value. You can use the enable property, or use IF widget to include the button or not.

regards,

I

Staff
Rank: #820

Hello,

Yes, that's it! Using Ajax Submit, you need to Ajax Refresh the Container and Button so that they appear after you get the cheapest room.

Regarding the condition, there are many possibilities, depending on the logic you are implementing. If everything appears as it should after you get the cheapest room, then you are fine :) 

Best regards

Rank: #39799

hello , im having an issue on room amenities, when i add (or Delete) an room amenity, i´m adding and deleting the amenity on all the rooms and not only on that specific room , i will leave some print to better ilustrate what i´m saying.

next screen


 Save Button to create or update room amenity

createouupdateroomamenity


what am i doing wrong ??