This topic is locked
[SOLVED]

 Select many fields for the list, but hide them by default

9/1/2020 2:16:05 AM
PHPRunner General questions
A
alfonso authorDevClub member

I want about 5 or 6 fields to appear in the list, but then I want the fields to be displayed to be chosen or selected, which by default are hidden. I know that they can be shown or hidden from the corresponding button. But by default I don't want them all to be seen

https://monosnap.com/file/Qi8aRemhgBh7hMWacyuYJzblZX0bZ8

Myr0n 9/1/2020



I want about 5 or 6 fields to appear in the list, but then I want the fields to be displayed to be chosen or selected, which by default are hidden. I know that they can be shown or hidden from the corresponding button. But by default I don't want them all to be seen

https://monosnap.com...acyuYJzblZX0bZ8

Option 1:
On the "Choose pages screen", List page Settings, Allow show/hide columns

click on Initial fields and choose which fields to show by default.

Option 2:

The easy way, is simulate to go to the listbox where all your fields are listed and simulate a click on the checkbox field that you don't want to show.

How to do it?
in my case, the field that I don't want to show every time that I show my page Investors is Telephone1and in the html code the name is hide_Telephone1, in your case I am going to suppose that the field name is RazonSocialand the html name will be hide_RazonSocial

In my project, event section, Javascript onload Event I will put the next code.



$("#hide_Telephone1").click();


Every Time that I'll go to the page Investors, that field will be hidden, if I want to unhide, I'll go to my list box Show/hide columns and I'll click on the checkbox field Telephone1and this will shows up.
In your case will suppose that will be:



$("#hide_RazonSocial").click();



You'll notice that when you click on the list box "Show/hide columns" you'll notice that the field "Razón Social" is uncheck.
I'll hope that this help you.
If you think that your question is been answer, please mark this thread as SOLVED.
The last phrase sound like a customer service, right?

A
alfonso authorDevClub member 9/16/2020

Option 1 don't works for me.

I select 3 fields: name, id, province. Unmarked I have state, photo, phone, email

Then, if I clic in button to show/hide fields on the page I don't get to show state, photo, phone, email. Those fields do not appear in the list

What am I doing wrong?

Thanks