More CSS IDs please

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

More CSS IDs please

Post by onoehring » 2019-06-05 11:02

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 1467 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

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: More CSS IDs please

Post by jsetzer » 2019-06-05 11:15

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
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: More CSS IDs please

Post by onoehring » 2019-06-05 11:29

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

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: More CSS IDs please

Post by onoehring » 2019-06-05 11:55

Hi Jan,

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

Olaf

Post Reply