Hi, I've recently added a new field called "Link" and in "add new record" view it displays in the place where "notes" used to be. A client continues to place notes in the new field, and not further down in the page where" notes" has moved to. Is it possible to hide the "Link" field on the "add new record" page ? Once added, I need the "Link" field to be visible.
Thank you
hide field on "add new record" page
Re: hide field on "add new record" page
Hi,
you can check if the detail view contains a SelectedID. If not, hide your field.
Check for
if ($j('input[name="SelectedID"]').val()=="") { then HIDE YOUR FIELD }
you can check if the detail view contains a SelectedID. If not, hide your field.
Check for
if ($j('input[name="SelectedID"]').val()=="") { then HIDE YOUR FIELD }
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: hide field on "add new record" page
pböttcher thank you. What would be the syntax for "HIDE YOUR FIELD" please ? Assuming the fieldname is "Link"
Re: hide field on "add new record" page
try
$j('#Link').hide()
$j('#Link').hide()
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: hide field on "add new record" page
thank you again, your help is much appreciated but I couldn't get it to work. I did find that in template_DV there were 5 rows allocated to "Link" and I only need one so I shrank it to only one. This moves the "Notes" field back up so hopefully will reduce input errors.
Re: hide field on "add new record" page
Hi,
where did you put the code? Maybe you can post what you did?
where did you put the code? Maybe you can post what you did?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: hide field on "add new record" page
Hi pböttcher, I'm using Appgini v.5.84, and have used Appgini for 10 years. I am not a coder/programmer, (BASIC was about the height of my achievements) but I get by with reading FAQ's, forums and Google. My business has been hit hard by covid-19 and it's not viable to spend a lot of time on my database appplication. Your suggestion of checking for "SelectedID" was very welcome and I inserted the line at various place in the /templates/***_template_DV.html but the result was either a line of text, or no difference. I had hoped there would be a simple solution but it appears not. Thanks again for your help.
Re: hide field on "add new record" page
Hi,
thanks for the insides. As it is not possible to know what level of knowledge is available to the person asking a question in the forum it is very hard to tell how much help is needed. So it would be beneficial to understand that in order to provide (more) help. Also not providing detailed information about the settings makes it very hard to provide a bullet-proof solution.
In your case you need to place the code in the hooks folder into the file called TABLENAME-dv.js (if it does not exist, create it) where TABLENAME is the table containing your field "Link".
Try
thanks for the insides. As it is not possible to know what level of knowledge is available to the person asking a question in the forum it is very hard to tell how much help is needed. So it would be beneficial to understand that in order to provide (more) help. Also not providing detailed information about the settings makes it very hard to provide a bullet-proof solution.
In your case you need to place the code in the hooks folder into the file called TABLENAME-dv.js (if it does not exist, create it) where TABLENAME is the table containing your field "Link".
Try
Code: Select all
$j(function() {
if ($j('input[name="SelectedID"]').val()=="") { $j('#Link').hide() }
})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: hide field on "add new record" page
It works !!!! Thank you so much, your patient help and understanding is very much appreciated. You've made my life a little easier. Best regards, Norman