Re: PloneFormGen custom field

Chuck Theobald <[email protected]> Tue, 31 Mar 2015 15:58:03 -0700
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <[email protected]>
Thanks, Rick. I solved the issue in a similar manner, getting by with 
css entries for each id:

#archetypes-fieldname-start_minute {
     float: left;
     clear: none;
}

Now my selection fields are next to one another as if I had a sane and 
user-friendly HH:MM:SS set of fields.

Cheers,
Chuck


On 03/31/2015 03:00 PM, Rick Bruch wrote:
>
> Hi Chuck,
>
> I don’t know about the first part, but I was able to line up fields 
> horizontally with a combination of CSS and JavaScript.
>
> // CSS (in ploneCustom.css)
>
> div.pfg-form div.ArchetypesStringWidget {
>
> display: inline;
>
> }
>
> div.pfg-form label.formQuestion {
>
> display: inline;
>
> }
>
> div.pfg-form input.blurrable {
>
> display: inline;
>
> }
>
> // JavaScript (in a file in /portal_skins/custom, included in the 
> /portal_javascripts registry)
>
> jq(document).ready(function() {
>
> $('.fieldErrorBox').remove();
>
> $('.formHelp').remove();
>
> });
>
> The jQuery snippet above removes the “formHelp” and “fieldErrorBox” 
> elements for the whole form but you could target it to specific fields 
> by selecting on their HTML ids, which are derived from their “short 
> names” in Plone.
>
> This is kind of a hacky way to do it but it was a one-off and ended up 
> working fine. Some details may be missing, it’s been a while since I 
> set it up, but that should get you on the way.
>
> -Rick
>
> *From:*Chuck Theobald [mailto:[email protected]]
> *Sent:* Tuesday, March 31, 2015 2:35 PM
> *To:* [email protected]
> *Subject:* [Plone-Users] PloneFormGen custom field
>
>   * Plone 4.3.3 (4308)
>
>   * CMF 2.2.7
>
>   * Zope 2.13.22
>
>
> I would like to create a custom field in PFG. It would be similar to 
> the date/time field, but would offer only HH:MM:SS. What would be the 
> best way to go about this task?
>
> Alternatively, how can I put three selection fields next to each other 
> horizontally? i suspect I need some sort of custom template, but don't 
> know where to look.
>
> Thank you,
>
> -- 
> Chuck Theobald
> System Administrator
> The Robert and Beverly Lewis Center for Neuroimaging
> University of Oregon
> P: 541-346-0343
> F: 541-346-0345
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
>
>
> _______________________________________________
> Plone-Users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/plone-users

-- 
Chuck Theobald
System Administrator
The Robert and Beverly Lewis Center for Neuroimaging
University of Oregon
P: 541-346-0343
F: 541-346-0345

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/

_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users