Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8902391
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:36:03+00:00 2026-06-15T01:36:03+00:00

I am trying to override the default widget layout in Dexterity, where label, description,

  • 0

I am trying to override the default widget layout in Dexterity, where label, description, and entry area are on three separate lines:

Name
The person's name
[________________]

I’d like instead to have fields appear in a table with the form:

Name: [_____]

with “The person’s name” appearing (if at all) only when someone hovers over the area.

I’m able to override plone.app.z3cform.templates.macros.pt successfully using z3c.jbot; however, changes to the file plone.app.z3cform.templates.widget.pt have no effect I can locate. (See update just below.)

All the templates I find ask each individual widget to render itself, as a single unit with label and descriptive text, AFAICT using a view called @@ploneform-render-widget, but I’m unable to find any page templates associated with that view. Can anyone suggest where such templates would be?

[Update: Note that templates.py in plone.app.z3cform includes the following, which probably means that z3c.bjot is bypassed:
# The widget rendering templates need to be Zope 3 templates
class RenderWidget(ViewMixinForTemplates, BrowserView):
index = ViewPageTemplateFile(‘templates/widget.pt’)
class RenderSingleCheckboxWidget(ViewMixinForTemplates, BrowserView):
index = ViewPageTemplateFile(‘templates/singlecheckbox.pt’)

So, if that is the problem, what must be done to make this compatible with z3c.jbot?]

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T01:36:05+00:00Added an answer on June 15, 2026 at 1:36 am

    OK, Martijn Pieters has provided what I’m sure is good advice — do this using css and perhaps Javascript.

    Let me share what has worked for me; hopefully people will point out where I’m using old stuff, where I’m being inappropriate, etc… But this is a starting point:

    On my local machine, I create a file named project-css.css with the following contents:

    .z3cformInlineValidation {
     float: left;
     position: relative;
     display: inline-block;
     background: red;
    }
    .z3cformInlineValidation label {
     float: left;
     width: 15em;
     background: yellow;
     text-align: right;
    }
    .z3cformInlineValidation div {
     display: inline;
    }
    .z3cformInlineValidation input {
     float: left;
     background: pink;
    }
    .z3cformInlineValidation input[class~="int-field"] {
     background: purple;
     width: 2em;
    

    At least on my browser (not IE), this has the effect of putting input fields (an element of type input inside of an element of class z3cformInlineValidation ) after right aligned labels, at a column beginning about 15 em spaces into whatever box encloses the labels and input fields. The integer input fields, which are marked by zope/plone/z3cform/dexterity/? with the class “int-field,” are reduced in size so they don’t extend across the box. The “background” attributes are just there to see what’s going on, and can be removed.

    Go to the zope management interface, select portal_skins, select custom, select “File” from the drop down list near the “Add” button at top right, then click “Add.” On the resulting screen, use project-css.css as your “id” and upload the file project-css.css

    Go to the zope management interface, select portal_css, scroll to the bottom and fill in the “id” field with project-css.css. Then click “Add”.

    The CSS will then rearrange all Dexterity default form output, I believe.

    To restrict it so that it is only used by my form, I’ve found a condition statement included in the portal_css for project-css.css like this to work (there are no quotes around the complete expression)

    python: request.URL.endswith('end_of_applicable_url') 
    

    I’m sure there are more appropriate ways, and I would be grateful if someone would point them out.

    As when I last visited Zope/Plone, I find the capabilities tantalizing, but the documentation, while MUCH improved, still seems to leave out one or two of the little magic things that a beginner needs to get rapidly up to speed, probably because they are so obvious to those who use the product on a day to day basis.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to override the default img tag style when a category is
Trying to override a tostring in one of my classes. return string.Format(@ name =
I'm trying to override a method inside a jquery widget. The method can be
I'm trying to override the default DatePicker template in Silverlight. I want to remove
I am trying to override the default implementation of the raw/endraw block tag in
I'm trying to override the default jquery text for client validation in an MVC
I'm trying to override the default behavior in a UITableView (which is in fact
I am trying to override the default page setup margins for my users. The
I am trying to override the jQuery ajax function to handle a default action
I'm trying to make an application where the user can override the default behaviour

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.