drupal 7 forms : custom rendering - forms

drupal_render($form) works fine for my purposes in general, but there are cases where I'd like a form to have a different layout style
(specifically I'd like all the fields and submit button to appear in one horizontal row)
Is there a way to specify a different rendering for a specific form, and leave the rest with the default rendering for the theme?

If it's the layout you want to change, most likely, you'd want to change the CSS, not the markup.
If you want to display all the fields and submit button in a row, you could change them into blocks and "float: left;" them.

Related

How do I change navbar logo and styling dynamic?

I am building a multi tenant platform and want to have different logos and styling of the navbar depending on logged in user or some other business rule. How do I do that?
If I want to add widgets on the navbar, for example notification indicator, how do I do that?
An interesting possiblity is to make a component, and that component includes a /style tag that is data-bound. You can also include base64 coded images that is used by the css in your component.
For inserting stuff in the navbar maybe you can use pseudo elements from CSS.
Otherwise I would install a local Turnkey development like this https://wiki.mdriven.net/index.php/Development_in_Visual_Studio. Then you can change any part of the site.

Is there any valid way to show an input without a border in SAPUI5?

I am working on a SAPUI5 app in which we do not want to add custom css to. Currently we are displaying text in a form which does not have the same height and styling as the inputs.
I'd prefer to change the text to an input with a pre-filled value so everything in the form has consistent styling but I need to differentiate that this should be treated as text.
The easiest way to do this is to remove the border but I cannot find away of doing this without creating custom css.
I tried borderDesign="None" but this does not affect inputs.

Bootstrap adaptive Form not playing nice with Kendo multiselect

I am using "Bootstrap responsive form" (http://www.bootply.com/jrNvaahcOh) and Kendomultiselect (http://demos.telerik.com/kendo-ui/multiselect/index)
The Bootstrap form scales the whole form, adapting the placement (and width) of form fields based on screen size.
My example works with the form only: http://jsfiddle.net/52VtD/12239/
It does
Draw the adaptive form
Wait 2 seconds
Activate Kendomultiselect (problem here!)
Problem: When there are two columns of form fields (I assume it breaks whenever the kendomultiselect is rightmost), the Kendomultiselect messes up the "flow" of design -> It seems like the next element get's thrown off it's proper placement and is not where it should be.
The Kendo Code that activates the simple html select is
$("#food").kendoMultiSelect().data("kendoMultiSelect");
..currently setup with timeout of 2 seconds to show the effect in my example.
Can anyone point out why this happens? I can only assume Bootstrap's css has problems with Kendo's css.

Styling a Radio Button Group using the purecss.io framework

The other day I stumbled on the Pure project - a set of CSS modules released by the YUI team. I wanted to standardize the forms across my website and I liked the look of their forms module. Especially the style of form they call the Aligned Form. I added the CSS to my site and added the needed styles to my form and it all worked well except for my group of radio buttons. In the Aligned Form each input has a label on the left side and the input to the right of it's label. But individual Radio Buttons have individual labels - which get styled to the right of the button. What I'm looking for is a way to add an overall label for the group of buttons that is styled to the left and centered.
I did find a workaround, but I'm looking more for a dedicate "Pure" way of doing it.
My workaround was to include the radios within a fieldset, and use the legend of the fieldset as the label for the radio group.
I'd enjoy hearing from others who work with Pure Aligned Forms to see how you handled this.
Your question is a little vague I think. If what you are trying to achieve is something like this,
Label
radio
radio
radio
then the way you did it (what you call your "workaround") is actually the best way to do this. Fieldsets are meant for grouping items together and you can use the legend as the label.
However, if you are trying to do something like this,
radio
Label radio
radio
then you are going to want to use floating divs (one to hold your label and another to group your radio buttons).
I can't really get more specific without knowing what your code looks like and what you are specifically going for...

Is there a Zend_Form_Element that renders a plain div with some content?

Working on a bunch of forms at the moment and I'm finding that I want to be able to split a form into sections with some text in between. Is there a Zend_Form_Element that simply allows me to place some text mixed in with my form (not as a label or description linked to an individual input)?
Thanks!
I think there's not.
Although, you can do one of the following things:
If the text inbetween is more like a title, you can group them in display groups.
If you want to put a lot of text then you'll have to write your own custom form element.
If you choose the second option beware of your form decorations. If you want the text to be from side to side of the page (ie. without the labels space to the left and not aligned to the rest of the input forms) you'll probably have to disable default decorators and set new ones.