Dynamic Widget types?

21 views
Skip to first unread message

Ruben

unread,
Mar 2, 2025, 11:12:33 AMMar 2
to Xataface
Hello

Does anyone know if it is remotely possible to dynamically change widget types?  For instance based on a validation rule for the value? Because I am trying to build a attribute based Product Information System (because the content types of the Items I am stroing are so vast and ever changing, that a 1 table per type would be unmaintanable.

Or would it be the best way to just add 1 column for each datatype and hide the ones that are not needed for an attribute value?

Any help or pointers in the right direction would be greatly appreciated!

Ruben

Steve Hannah

unread,
Mar 2, 2025, 1:29:42 PMMar 2
to xata...@googlegroups.com
There's a few approaches.  All would involve some javascript.

Generally in situations like this, I add all widgets I want - I might group into sections.  Then use Javascript to show/hide fields or sections as required.

You might find the depselect source to be helpful in seeing something dynamic.  https://github.com/shannah/xataface-module-depselect/blob/master/js/xataface/widgets/depselect.js



--
You received this message because you are subscribed to the Google Groups "Xataface" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xataface+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/xataface/ab181340-011f-49fc-b0b9-114feb1700b7n%40googlegroups.com.


--
Steve Hannah
Web Lite Solutions Corp.
Reply all
Reply to author
Forward
0 new messages