Django - Crispy Forms - Custom input positioning and inline radio buttons and help text - django-crispy-forms

Building off Django - Crispy Forms - Custom input positioning and inline radio buttons, how could one get the help text to be on the next line using crispy? Right now, the help text comes on the same line as the choices? Here's what I get:
image of form
What I'd like is the help text to look how it comes out for the select input.
Thanks

Related

Django Autocomplete-Light allow any text input fields

I have Django Autocomplete-light running with Crispy Forms, but I need to allow users to enter any text into the form. At the moment the user can either select one of the options from the autocomplete dropdown, or nothing.
Note that I am using the Select2ListView from Autocomplete-light
Does anyone know how I can easily modify Autocomplete-light, or Crispy Forms to allow any text to be entered?
Thanks
Stephen
Your field is linked to a foreignkey, so you can create an inline form that points to your related model in your view.

KendoUI: how to use edit in line for html form in KendoUI

Firstly, I am doing a research on KendoUI, and my experience is mainly on struts-layout taglib.
And now I got issues on HTML Form while using KendoUI.
My Questions are as below:
Can Kendo ListView be used to replace the html form? That is, there is no Form any more, but a kendo ListView.
If still use html form, how to make each field editable in line (is there any kendo widget to do same behavior as JQuery UI plugin X-editable)?
The closest thing would probably be a Grid that is editable. Clicking on a cell puts it in edit mode: http://demos.telerik.com/kendo-ui/grid/editing
But you could also make a custom Kendo UI widget that behaves basically the same as x-editable by having a clickable element that opens a Kendo Tooltip box with an input element in it.

Sitecore page editor dropdown

I would kindly ask for your help :) From couple of days I am trying to achieve "linked" custom field in content editor and dropdown in page editor.
Basically I want to have dropdown in page editor and content editor which are responsible for a same thing.
In my c# code i have enums which represent directions. I created custom field which accepts assembly and class with overridden onload method and successfully populate dropdown values in the content editor. So far so good but i have no idea how to create dropdown which will represent the same functionality inside page editor.
So please give me any ideas...
Judging from your reply to my comment you need to think of the following: How is my field value being rendered onto a page?
If you are always using 1 control to do this then you just need to ensure that this control has 2 different rendering modes depending on the Context.PageMode
But as I understand it you want this dropdown to also appear when someone renders your custom field using a <sc:FieldRenderer>. In this case you'll need to look into the RenderField pipeline of Sitecore. There you find a processor called RenderWebEditing. Possibly through some manipulation here you can get your dropdown appear as you wish.

Can I create quiz GUI with Django-Forms?

I'm new to django, and I'm working on a quiz project. The idea is to create something similar to this (http://www.stylemint.com/quiz). Basically, there will be a question on each page and the user clicks on an image with the answer. I was planning on using a django form with a radio select input type, however, I'd like the image to act as the radio button (ie, be clickable) and also a click on the image will take you to the next question (instead of having to click submit after each). Is this possible with django, or do I need java?
it's perfectly possible - if you just want a series of images, and clicking on them to take you to the next question you might achieve that by:
Having multiple input fields of type "image" which all submit the form. If you go down that route you'll have to template the forms out yourself or make your own widget.
Using javascript to replace radio buttons with images dynamically. If you do that, it'd be a good idea to make it fall back to a straight list selection for people who don't have javascript.
Ignoring forms altogether and just using a view with a parameter of what the choice is.
Yes, it's completely possible. My suggestion is if you want to save the result in the db use model and model form in django. So, my next suggestion is you can customize model field for combine radio button functionality and image together. But actually you must programming and use a little jquery and javascript to do it.
You may want to see:
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/
https://docs.djangoproject.com/en/dev/howto/custom-model-fields/

Two Column Article content Joomla

How to make some of article when I click readmore the paragraph not show
to the bottom but to the right side...
Here's the illustration screenshot:
http://www.oymo.com/upload/uploads/collumn-artikel.jpg
You can't do proper columns - ie. when the text flows from the bottom of one column it moves to the top of the next, without use of CSS3 (which isn't widely supported). You could probably do something with a bit of mootools or jquery as an alternative.
However, if you just want to show the intro text in one div and the main text in another (something like http://www.kodaklens.co.uk/mobile/) then you need to modify your template /templates/templatename/html/com_content/article/default.php, by creating your required 'static' layout and then loading the different article pieces into each container, but this won't help with text flow.

Resources