docurist Posted July 2, 2008 Report Share Posted July 2, 2008 Can I use conditional statement in HTML Block - Details page? If so, how can I use it? Could you give me some examples? Here is an example of my question. Some items has multiple locations but some items are not. HTML block in details page we have code for list up to 3 addresses. [@field:Address1], [@field:City1], [@field:State1] [@field:Address2], [@field:City2], [@field:State2] [@field:Address3], [@field:City3], [@field:State3] If an item doesn't have address2 or 3, how can I hide line 2 or 3? Quote Link to comment Share on other sites More sharing options...
0 bahar_vm Posted July 2, 2008 Report Share Posted July 2, 2008 In the HTML block you could have the following: var mycity = '[@field:city2]' ; if(mycity != \"\") { document.write(mycity);} This code check if city2 value is not blank then display it. B.M Quote Link to comment Share on other sites More sharing options...
0 docurist Posted July 3, 2008 Author Report Share Posted July 3, 2008 Thanks B.M., Is there any server side script we can use? Quote Link to comment Share on other sites More sharing options...
0 bahar_vm Posted July 3, 2008 Report Share Posted July 3, 2008 Hi, Inside HTML blocks, header and footers of Caspio Bridge DataPages, you could just put Java Scripts and no other languages could be used there. B.M Quote Link to comment Share on other sites More sharing options...
0 kp3080 Posted March 26, 2013 Report Share Posted March 26, 2013 Conditionals can be entered in Caspio in the form of Rules. You can hide, show, require or disable specific fields based on the value or selection of other fields in the same form. http://howto.caspio.com/datapages/creat ... rules.html Quote Link to comment Share on other sites More sharing options...
0 NailDyanC Posted January 16, 2021 Report Share Posted January 16, 2021 Hi, just to update this post, here's the updated link for conditional forms or creating rules: https://howto.caspio.com/datapages/forms/conditional-forms/ Quote Link to comment Share on other sites More sharing options...
Question
docurist
Can I use conditional statement in HTML Block - Details page? If so, how can I use it? Could you give me some examples?
Here is an example of my question.
Some items has multiple locations but some items are not.
HTML block in details page we have code for list up to 3 addresses.
If an item doesn't have address2 or 3, how can I hide line 2 or 3?
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.