Spectrum Module

alt=
Marla
@sweet
11 hours ago
41 posts
I understand now... thank you, Michael!!!
updated by @sweet: 12/22/24 02:32:13AM
michael
@michael
10 hours ago
7,744 posts
I don't know what the spectrum module is sorry. Is it from a different developer?

--edit--
Yeah its one of @ultrajam's
https://www.jamroom.net/ultrajam/networkmarket/148/spectrum-color-picker

if its allows a custom color picker to be saved to the database via CUSTOM FORM EDITOR then that will be a 2 step process.

Use it on the form to record the value. That value will then be there with the rest of the form information.

So if you added it to say a blog post as 'blog_background_color' then in the templates when you're using laying out the other blog info you will also have the value of what that was set to.

Maybe use it in combination with CSS or 'style=" to customize the look of whatever you're trying to build.
updated by @michael: 12/21/24 11:57:51PM
michael
@michael
8 hours ago
7,744 posts
Good on you for trying to understand, I know it can be complicated.

Any module that you can use the CUSTOM FORM fields on is using what we call a 'datastore'. Its a KEY -> VALUE database structure:

https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1023/datastores

It gives modules flexibility to interact with each other.

Basic Concept:
* info gets INTO the database via forms.
* info comes out of the database via templates. (usually via {jrCore_list} )

https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/89/jrcore-list

https://www.jamroom.net/the-jamroom-network/documentation/modules/2885/simple-custom-forms


There's a ton of over-ride points to pretty much everything which allows for a lot of flexibility but it does create a lot of complexity unfortunately.

So: If you add something to some modules form like spectrum, when you add it you'll have to choose a name to add it on that starts with the 'prefix' of the module, so for the jrBlog module its 'blog_..... for jrAudio its 'audio_....... etc.

So when you open the CREATE or the MODIFY form and save it all the info gets stored along with that thing's '_item_id'.

Now its just info in the database, but if you go to a location where you can see the other info related to that item id you can customize the templates to do whatever you want.

So you need to decide what you want the color selected by spectrum to do. Once you know what you want it to do then you adjust the templates so it does that.

Tags