Forms and Blocks

Permalink
Hi,

I've built some custom widgets such as an image uploader that I would like to integrate in c5.

If you think about an image uploader, you have a BROWSE button to retrieve a photo, an UPLOAD button and in my case a SAVE button.

My question is, if I embed all of the custom php into one block, how would I be able to adjust the CSS for each of these buttons?

 
goutnet replied on at Permalink Reply
There are different approaches you could use, but if you are ok to type in css code, you could add a field in your db.xml to hold that code, say ... customStyle :

Check that howto here :http://www.concrete5.org/documentation/how-tos/developers/creating-...

Then in your view.php, just add the style within a style tag, something like this (before rendering your image) :

<style type="text/css"><?=$customStyle?></style>


Another simple approach, is simply to use the "Design" feature onto the block when you just added it, and customize the css (last tab of the designer menu).
biz0087 replied on at Permalink Reply
Thanks goutnet, you are appreciated.