custom css for my form ... HELP

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

custom css for my form ... HELP

karthik Jayaraman
This post was updated on .
As i said in my previous post, i am new to this ORBEAN world. Now here s my task

1. I have to change the css of a newly created form (eg) change the column width of the grid.

I dont know where the css files are and where should i edit those.
I cant even find where my form resides. I found it in the DB but i cannot trace it back in any of the folders

People please help me.....




Regards,

Karthik Jayaraman

Reply | Threaded
Open this post in threaded view
|

Re: custom css for my form ... HELP

lacco
Hi!

Although I am a Orbeon novice, I have been faced with a similar styling problem today. Here are some of my results:

* Configure paths to stylesheets: http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-form-runner#TOC-Default-CSS
* Configure paths to stylesheets on form level/ add own stylesheets: http://n4.nabble.com/Form-Runner-PDF-td1478149.html#a1498230
Erik Bruchez-3 wrote
In your properties-local.xml, you can add a
link to your own CSS file. The default is:

<property as="xs:string"  name="oxf.fr.css.uri.*.*"
  value="/ops/yui/reset-fonts-grids/reset-fonts-grids.css
    /apps/fr/style/form-runner-base.css
    /apps/fr/style/form-runner-orbeon.css"/>

You can create your own property for your forms, per application, e.g.:

<property as="xs:string"  name="oxf.fr.css.uri.my-app.*"
  value="/ops/yui/reset-fonts-grids/reset-fonts-grids.css
    /apps/fr/style/form-runner-base.css
    /apps/fr/style/form-runner-orbeon.css
    /forms/my-app/my-css.css"/>
With this configuration, you can place a stylesheet under WEB-INF/resources/forms/my-app/my-css.css
* form-runner-base.css and form-runner-orbeon.css can be found in WEB-INF/lib/orbeon-form-runner.jar

Perhaps this helps you a little bit...
Reply | Threaded
Open this post in threaded view
|

Re: custom css for my form ... HELP

karthik Jayaraman
lacco wrote
......................
With this configuration, you can place a stylesheet under WEB-INF/resources/forms/my-app/my-css.css
* form-runner-base.css and form-runner-orbeon.css can be found in WEB-INF/lib/orbeon-form-runner.jar

Perhaps this helps you a little bit...

I appreciate your help !! Now i am facing two issues .

1. I cant find  properties-local.xml in my orbeon pack
2. I cant find any kind of directory for application. For example /forms/my-app/my-css.css. My newly created form gets stored in the database

Now help !! PEOPLE
Reply | Threaded
Open this post in threaded view
|

Re: custom css for my form ... HELP

lacco
> 1. I cant find  properties-local.xml in my orbeon pack
Under WEB-INF/resources/config/properties-form-runner.xml I could find
exactly this configuration (search for "oxf.fr.css.uri.*.*").

> 2. I cant find any kind of directory for application. For example
> /forms/my-app/my-css.css. My newly created form gets stored in the database
I'm not sure if I understand you correctly. If you create a new form
type for application 'my-app', you are able to use the configuration
entry "oxf.fr.css.uri.my-app.*" and set any stylesheet path you want.
It was proposed to set the config to '/forms/my-app/my-css.css'
 and place the file under WEB-INF/resources/forms/my-app/my-css.css

Don't forget: You have to restart the web server after changing the
configuration.

I just explored another possible way to define a custom stylesheet for
a form: You can configure Orbeon to display an accordant "Upload CSS"
button in form builder:
WEB-INF/resources/config/properties-form-builder.xml => oxf.fb.menu.css => true
I haven't tried this since I wanted to change the style for all my
forms, but I think this is a good way to make layout changes to one
form only...
Reply | Threaded
Open this post in threaded view
|

Re: custom css for my form ... HELP

karthik Jayaraman
K. This time i got you right.

1. I created a folder named "jk" inside WEB-INF\resources\forms directory and placed a file called my.css with the following content

.xforms-label {background-color: #DF731B;
}

2. In the properties-form-runner.xml i edited the following lines

 <property as="xs:string"  name="oxf.fr.css.uri.*.*"       value="/ops/css/yui/reset-fonts-grids.css
                                                                           /apps/fr/style/form-runner-base.css
                                                                           /apps/fr/style/form-runner-orbeon.css/>                                                           

to look like this

 <property as="xs:string"  name="oxf.fr.css.uri.*.*"       value="/ops/css/yui/reset-fonts-grids.css
                                                                           /apps/fr/style/form-runner-base.css
                                                                           /apps/fr/style/form-runner-orbeon.css                        /forms/jk/my.css"/>

3. Restarted my server but still NO EFFECT !! And thanks for your kind intention to resolve my problem