Page 1 of 1

More CSS IDs please

Posted: 2019-06-05 11:02
by onoehring
Hi,

I notice, that not all items have CSS IDs on them. It would help a lot, if you could directly generate IDs for each DIV, SPAN.
In my case (see image) I would hide the complete DIV for a user. This can not be done easily at this time (I believe) - as it has no CSS ID.
If it would have an ID I could use a hook and hide this (or before building the page actually not even generate it).
more_IDs_please.png
more_IDs_please.png (159.25 KiB) Viewed 2330 times
Maybe the IDs can be autogenerated using a MD5 of the timestamp+fieldname when the field was created in AppGini - that should be unique. This way, you could show that unique ID to the developer and the developer could still rename it to something that makes more sense.

Olaf

Re: More CSS IDs please

Posted: 2019-06-05 11:15
by jsetzer
What about:

Code: Select all

$j("#fieldname").closest(".form-group").hide();
You can do whatever you want with your fields like hiding, locking (readonly), moving around, changing labels, aligning fields, ...

You can even create additional tabs in the children-tabs or wherever you want, move fields there, build a multi-column-layout, ...

From my experience, mostly everything can be done by selecting the fieldname and then using JQuery on the element.

;)

So from my point of view there is no need for additional id-attributes.

Best,
Jan

Re: More CSS IDs please

Posted: 2019-06-05 11:29
by onoehring
Hi Jan,
well jquery is kind of a foreign (uncharted) land for me :-)

So I dare to ask: Where would I need to put that code to hide the part marked in the screenshot?

Olaf

Re: More CSS IDs please

Posted: 2019-06-05 11:55
by onoehring
Hi Jan,

thanks again for your suggestion. I was able to implement this into the hooks _footer function and it works.

Olaf