Styling a Radio Button Group using the purecss.io framework - forms

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...

Related

Form borders and title bar

I'm pretty sure this must have been asked before but I can't seem to find a solution. I have some pop-up forms which I want to show without title bar since I've designed custom placement functions and I don't want them to be moved or closed from the title bar, so having it show only makes the form look uglier. I haven't found a way to hide it other than setting the form border to none, but that makes some small forms that popup on top of other forms (which I don't want to close when opening the other form because of crossed references and various visual reasons) merge with the form on the background and make it hardly distingishable.
So, I need a way to hide the form title bar while being able to set a thin border for the form to establish its bounds clearlier. I've tried setting a rectangle around my forms, but since I'm using form headers I can't put it around the whole form. I guess I could put one around the header section and another around the details section, but it makes it look horrible. Any simple way to achieve what I intend to do?

How can I add a custom column menu tab in ag-grid?

Is there a way to add a custom column menu tab with my own favourite icon which on click would render my custom react component?
something like
myColDef.menuTabs: ['generalMenuTab', 'filterMenuTab', 'myCustomMenuTab']
FYI I'm using v12.0.2
What you're after can't be done I'm afraid. The grid supports React components in all sorts of ways (renderers, editors, filters etc), but not via the column menu.
I've updated the docs page to remove the gibberish issue - it'll be fixed properly in the next release, thanks for highlighting this.
This would be helpful to have. In particular for us, we'd like to filter based off row properties, and not row values. Creating our own tab to filter by cell colors that we have assigned with our own set of labels would be useful.
I agree that it would be a nice feature to have. Apparently, there's no quick out-of-the-box solution to do it. The only workaround I see is to implement your own custom Header component which would display any buttons your want.
There you can put a button to open your own custom menu, which you can implement as any regular UI component. It also means you'll need to manually implement all standard menu options that Ag-Grid provides out of the box if you need them.

"Segmented Button" with Multi-line Text

I'm not sure exactly what keyword I should be searching, but I wasn't able to find the answer to my problem - I'm new to iOS development so apologies in advanced if I'm not using the correct UI components.
I want to create something like a segmented control (two choices) with multi-line descriptions in them, except I'm not sure if I should be using a segmented control to do so, or to customize a button to create it. The user should be able to select a "choice" and that will switch views and tint the choice not selected depending on the choice the user makes. How exactly would I design this / is this possible?
I've already attempted to modify the segmented control but couldn't get the desired results. I've thought about creating a text box and modifying it to act like a button selector, but wasn't sure if that was the best way. I would love some input, thanks!

Typo3: powermailer: one form on different places on the same page

I have a page where I need one form in the main content and one in the footer.
The problem is that these two forms should be connected.
The form in the main content have three input fields for name, email etc. and the one in the footer has two radio buttons.
The radiobuttons work as "I agree" so they have to, somehow, be connected to the other fields.
I use typo3 with powermailer.
I have a thougth of using css and just move those radiobuttons to the footer.
But I would like a more permanent sollution. Thanks.
I think that there is currently no better solution, but youre on the right way with CSS.
If i understood you correctly. You are trying to implement two plugins which are connected to each other. This is impossible with powermail.
Dirty, but useable is the CSS way or maybe a JavaScript solution for some fancy effects.

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.