CSS #id ?

naim - August 9, 2007 - 20:15
Project:Compact Forms
Version:5.x-1.0
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I installed the compact_forms module, seems it works fine for the user-login-form, but how do i get it for other forms? Mainly i need for a simple cck item content type, with mostly simple text fields. I peaked in the page source for that form, and i see its using the "node.css", i tried that, no luck.

Any hints appreciated

#1

tomsun - August 9, 2007 - 20:34

Check the form HTML again. The tag wrapping the entire form has an id="" attribute, which is what Compact Forms looks for. The id attribute is optional so you might not find it on all forms...

<form action="/node?destination=node"  method="post" id="user-login-form">
...
...
...
</form>

The above example is taken from the user login block. In this case I enter 'user-login-form' on the settings page (done by default).

Form ID:s:
user-login-form

What if I want the behaviour on the user register form as well? That form looks like this:

<form action="/user/register"  method="post" id="user-register">
...
...
...
</form>

Hence, you add 'user-register' on the settings page:

Form ID:s:
user-login-form
user-register

Hope that clarifies the idea. I'm thinking of adding checkboxes for common Drupal forms in the next release, to make the process even easier.

#2

naim - August 10, 2007 - 09:16

thanks, works just like you said

#3

Foodster - November 2, 2007 - 23:32
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.