Styling External Forms?

Permalink
I am trying to add an external form, but I wanted to dicate the width, so I want to put it in a div. Is there a standard css file that can be included along with the controller and view (like view.css is used for blocks)?

I tried quickly to build it as a block, but I errored out on the post. I don't want to spend the time I could be spending on other features if I can style that form relatively easily.

Thanks, the forums here are fantastic.

 
CC3381 replied on at Permalink Reply
CC3381
You could create a page type for your form( such as form.php) . Then you could add the id's or classes you want to the page type and than add the css to your themes main css file.
cryophallion replied on at Permalink Reply
That's what I was hoping to avoid, and do it on the block level.
CC3381 replied on at Permalink Reply
CC3381
Try taking a look at this how-to. It should get you what you want.

http://www.concrete5.org/documentation/how-tos/designers/custom-blo...
cryophallion replied on at Permalink Reply
I understand how to theme blocks locally. I was more trying to see if there was a standard "view.css" or somesuch that was autoloaded with the external form block. Since it doesn't appear so, I will likely just make my own block to handle the form.

Thanks!
glockops replied on at Permalink Best Answer Reply
glockops
Forms using the "External forms block" have their own associated controller files. You can use addHeaderItems() to insert CSS/JS using the controller's on_page_view() function.

I have some examples at work, but don't have VPN - so I'll post them tomorrow.
cryophallion replied on at Permalink Reply
Now that makes a ton of sense. I can just add a tools folder below it for the styling.....

Great idea. Saved me having to make the validation work for the block (for some reason it was hanging on post).

Thanks!!!
glockops replied on at Permalink Reply
glockops
On the off chance you're looking for front-end form validation as well, this jQuery based validator is amazing:http://unwrongest.com/projects/valid8/...
cryophallion replied on at Permalink Reply
Oh, that IS pretty. I was just thinking a month or so ago about doing something similar, except make the icon at the end a mouseover for the error text.

I will definitely keep that one in mind....