SimonT Posted July 26, 2016 Report Share Posted July 26, 2016 Hi, Just starting with Caspio to determine if it meets the needs for our project. Apologies in advance if this question has already been answered on the forum, but I have looked and can't find anything. I have a simple user table (see attached). There is a column called 'EMail' and a column called 'CanEmailBeUpdated' (Y/N), the latter determining if the users email can be updated in a form. I have created a single record update data page which displays the email field. I want to make the email field display only if the corresponding 'CanEMailBeUpdated' field is set to N. I have tried using Rules, but they only seem to work for editable fields (i.e. I would have to make 'CanEMailBeUpdated' editable on the form, which defeats the point). Any ideas on how this should be achieved would be much appreciated! Quote Link to comment Share on other sites More sharing options...
MayMusic Posted July 27, 2016 Report Share Posted July 27, 2016 You can add a hidden virtual field to your DataPage , onload receive data source field and select CanEmailBeUpdated then use this virtual field in your rule Quote Link to comment Share on other sites More sharing options...
LWSChad Posted August 4, 2016 Report Share Posted August 4, 2016 Good idea May. That is definitely the easiest approach, however sometimes rules are limited. If the rules don't work try a CSS & JS solution. .UpdateRecordCanEMailBeUpdated {display: none;} var canUpdate = document.getElementById('UpdateRecordCanEMailBeUpdated').value; var emailEle = document.getElementById('UpdateRecordEMail'); if(canUpdate == 'Yes') { emailEle.style.display = "none"; } *NOTE* tableUser.CanEmailBeUpdated must be a text field to have an ID = UpdateRecordCanEMailBeUpdated. Set CanEmailBeUpdated with a dropdown with Yes and No as the only options. Quote Link to comment Share on other sites More sharing options...
SimonT Posted August 4, 2016 Author Report Share Posted August 4, 2016 Many thanks for both your responses. I'll give them a try. Quote Link to comment Share on other sites More sharing options...
MayMusic Posted August 5, 2016 Report Share Posted August 5, 2016 Thanks EIQ Quote Link to comment Share on other sites More sharing options...
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.