Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Checkbox inline for different db fields

Received: by 10.224.196.196 with SMTP id eh4mr86396qab.5.1335295054930;
        Tue, 24 Apr 2012 12:17:34 -0700 (PDT)
X-BeenThere: plataformatec-simpleform@googlegroups.com
Received: by 10.229.136.134 with SMTP id r6ls4781452qct.8.gmail; Tue, 24 Apr
 2012 12:17:33 -0700 (PDT)
Received: by 10.224.189.68 with SMTP id dd4mr91662qab.2.1335295053177;
        Tue, 24 Apr 2012 12:17:33 -0700 (PDT)
Received: by 10.224.189.68 with SMTP id dd4mr91660qab.2.1335295053138;
        Tue, 24 Apr 2012 12:17:33 -0700 (PDT)
Return-Path: <carlosantoniodasi...@gmail.com>
Received: from mail-qa0-f53.google.com (mail-qa0-f53.google.com [209.85.216.53])
        by gmr-mx.google.com with ESMTPS id b22si6758776qcs.3.2012.04.24.12.17.33
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 24 Apr 2012 12:17:33 -0700 (PDT)
Received-SPF: pass (google.com: domain of carlosantoniodasi...@gmail.com designates 209.85.216.53 as permitted sender) client-ip=209.85.216.53;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of carlosantoniodasi...@gmail.com designates 209.85.216.53 as permitted sender) smtp.mail=carlosantoniodasi...@gmail.com; dkim=pass header...@gmail.com
Received: by qadc11 with SMTP id c11so428005qad.5
        for <plataformatec-simpleform@googlegroups.com>; Tue, 24 Apr 2012 12:17:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:x-mailer
         :mime-version:content-type;
        bh=50rEWhb5rC5XlzCH9JT6jrJnsjgc3Zu9H0E3b1YsuRQ=;
        b=Z/jU7wH88Phu7Eep1d71H0sgERdmGmHkM1HlpMouT5daVu8vWJMob3bjHODpzEsO6G
         jUMdDmCpGI4MEz69+UYLBxyXL1NKVK0uIoM9SIS2K2iBtlL5AykhsNKJpq/pfnx0KbeQ
         W16wG9Z29DDxjVB6XYD8XUxTYDvv12cySD7/bRBp3zoOCO3rIPPXdTFNZgiZmAh6kjB+
         q6Hw08mcc+WbpDNO/9NETogsZdsjMYZCRqckSMfR9cFy9Uq9TrsQPz6ozDLAw08JP9oI
         9Pe/ez0eImdiCNHSYlypozJGOtiqikNQIhX9r5LORO5yU/Ty7fOyERJwzsdN02bmGhPg
         p8vA==
Received: by 10.224.175.67 with SMTP id w3mr50965qaz.82.1335295052889;
        Tue, 24 Apr 2012 12:17:32 -0700 (PDT)
Return-Path: <carlosantoniodasi...@gmail.com>
Received: from carlosmacbook.local ([187.7.46.128])
        by mx.google.com with ESMTPS id cp17sm7769995qab.5.2012.04.24.12.17.30
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 24 Apr 2012 12:17:31 -0700 (PDT)
Date: Tue, 24 Apr 2012 16:17:26 -0300
From: Carlos Antonio da Silva <carlosantoniodasi...@gmail.com>
To: plataformatec-simpleform@googlegroups.com
Message-ID: <C62D22EAD5124DF198AC9E3CE6A34...@gmail.com>
In-Reply-To: <183DA890-1F65-4561-A37B-C0774BE26...@gmail.com>
References: <24d24eb0-0445-4a83-8fc7-1caa7e2df...@f17g2000yqj.googlegroups.com>
 <738B138429294D2C95B106386797D...@gmail.com>
 <183DA890-1F65-4561-A37B-C0774BE26...@gmail.com>
Subject: Re: Checkbox inline for different db fields
X-Mailer: sparrow 1.5 (build 1043)
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="4f96fc46_2ae8944a_15bd9"

--4f96fc46_2ae8944a_15bd9
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

That's weird.. perhaps you could try adding some example to the https://g=
ithub.com/rafaelfranca/simple=5Fform-bootstrap app, so we can play with a=
nd see were we go=3F

-- =20
At.
Carlos Antonio


On Tuesday, April 24, 2012 at 3:59 PM, =46ernando Shayani wrote:

> Hi Carlos,
> =20
> I tried the solution, but didn't work. The output was all messy.
> =20
> =20
> Em 21/04/2012, =C3=A0s 19:29, Carlos Antonio da Silva escreveu:
> > Hey =46ernando,
> > =20
> > have you tried the solutions we've discussing in the issue=3F Did it =
work=3F =20
> > I'll link here for future reference: https://github.com/plataformatec=
/simple=5Fform/issues/538
> > =20
> > If it is not working for you yet, we can try to figure out another so=
lution. =20
> > =20
> > -- =20
> > At.
> > Carlos Antonio
> > =20
> > =20
> > On =46riday, April 13, 2012 at 10:00 AM, =46ernando Shayani wrote:
> > =20
> > > Hi all. I posted this question in the GitHut site but I'll also pos=
t
> > > here. Any help will be useful :)
> > > =20
> > > I'm having some trouble to create a group of checkboxes with
> > > simple=5Fform and bootstrap.
> > > =20
> > > I have 3 fields in the database that are booleans: option1, option2=

> > > and option3. I need to create a checkbox group inline like this:
> > > =20
> > > SELECT YOUR OPTIONS: =5B =5D Option 1 =5B =5D Option 2 =5B =5D Opti=
on 3
> > > Rails is expecting to send the fields as independent fields, like
> > > =22tablename=5Boption1=5D=22 , =22tablename=5Boption2=5D=22 and =22=
tablename=5Boption3=5D=22.
> > > =20
> > > If I use the
> > > =20
> > > f.input :option, :collection =3D> =5B=5Btrue, '1'=5D ,=5Btrue, '2'=5D=
,=5Btrue,
> > > '3'=5D=5D, :as =3D> :check=5Fboxes
> > > =20
> > > , the html markup will be messed up.
> > > =20
> > > I'm looking for a way so the markup will something like:
> > > =20
> > > <input name=3D=22tablename=5Boption1=5D=22 type=3D=22hidden=22 valu=
e=3D=220=22>
> > > <input name=3D=22tablename=5Boption2=5D=22 type=3D=22hidden=22 valu=
e=3D=220=22>
> > > <input name=3D=22tablename=5Boption3=5D=22 type=3D=22hidden=22 valu=
e=3D=220=22>
> > > =20
> > > If I just use the
> > > =20
> > > f.input :option1
> > > f.input :option2
> > > f.input :option3
> > > =20
> > > the checkboxes will be vertical and will not be =22grouped=22.
> > > =20
> > > Any ideas=3F =20
> > =20
> =20


--4f96fc46_2ae8944a_15bd9
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline


                <div style=3D=22font-family: Helvetica; font-size: 13px; =
=22>That's weird.. perhaps you could try adding some example to the&nbsp;=
https://github.com/rafaelfranca/simple=5Fform-bootstrap app, so we can pl=
ay with and see were we go=3F<br></div>
                <div><div><br></div>--&nbsp;<br><div>At.</div><div>Carlos=
 Antonio</div><div><br></div></div>
                =20
                <p style=3D=22color: =23A0A0A8;=22>On Tuesday, April 24, =
2012 at 3:59 PM, =46ernando Shayani wrote:</p>
                <blockquote type=3D=22cite=22 style=3D=22border-left-styl=
e:solid;border-width:1px;margin-left:0px;padding-left:10px;=22>
                    <span><div><div>Hi Carlos,<div><br></div><div>I tried=
 the solution, but didn't work. The output was all messy.</div><div><br><=
/div><div><br><div><div>Em 21/04/2012, =C3=A0s 19:29, Carlos Antonio da S=
ilva escreveu:</div><br><blockquote type=3D=22cite=22><div>
                <div style=3D=22font-family: Helvetica; font-size: 13px; =
=22>Hey =46ernando,<div><br></div><div>have you tried the solutions we've=
 discussing in the issue=3F Did it work=3F&nbsp;</div><div>I'll link here=
 for future reference:&nbsp;<a href=3D=22https://github.com/plataformatec=
/simple=5Fform/issues/538=22>https://github.com/plataformatec/simple=5Ffo=
rm/issues/538</a></div><div><br></div><div>If it is not working for you y=
et, we can try to figure out another solution.</div></div>
                <div><div><br></div>--&nbsp;<br><div>At.</div><div>Carlos=
 Antonio</div><div><br></div></div><p style=3D=22color: =23A0A0A8;=22>On =
=46riday, April 13, 2012 at 10:00 AM, =46ernando Shayani wrote:</p><block=
quote type=3D=22cite=22><div>
                    <span><div><div><div>Hi all. I posted this question i=
n the GitHut site but I'll also post</div><div>here. Any help will be use=
ful :)</div><div><br></div><div>I'm having some trouble to create a group=
 of checkboxes with</div><div>simple=5Fform and bootstrap.</div><div><br>=
</div><div>I have 3 fields in the database that are booleans: option1, op=
tion2</div><div>and option3. I need to create a checkbox group inline lik=
e this:</div><div><br></div><div>SELECT YOUR OPTIONS: =5B  =5D Option 1  =
 =5B  =5D Option 2   =5B  =5D Option 3</div><div>Rails is expecting to se=
nd the fields as independent fields, like</div><div>=22tablename=5Boption=
1=5D=22 , =22tablename=5Boption2=5D=22 and =22tablename=5Boption3=5D=22.<=
/div><div><br></div><div>If I use the</div><div><br></div><div>f.input :o=
ption, :collection =3D&gt; =5B=5Btrue, '1'=5D ,=5Btrue, '2'=5D,=5Btrue,</=
div><div>'3'=5D=5D, :as =3D&gt; :check=5Fboxes</div><div><br></div><div>,=
 the html markup will be messed up.</div><div><br></div><div>I'm looking =
for a way so the markup will something like:</div><div><br></div><div>&lt=
;input name=3D=22tablename=5Boption1=5D=22 type=3D=22hidden=22 value=3D=22=
0=22&gt;</div><div>&lt;input name=3D=22tablename=5Boption2=5D=22 type=3D=22=
hidden=22 value=3D=220=22&gt;</div><div>&lt;input name=3D=22tablename=5Bo=
ption3=5D=22 type=3D=22hidden=22 value=3D=220=22&gt;</div><div><br></div>=
<div>If I just use the</div><div><br></div><div>f.input :option1</div><di=
v>f.input :option2</div><div>f.input :option3</div><div><br></div><div>th=
e checkboxes will be vertical and will not be =22grouped=22.</div><div><b=
r></div><div>Any ideas=3F</div></div></div></span>
                 =20
                 =20
                 =20
                 =20
                </div></blockquote><div>
                    <br>
                </div>
            </div></blockquote></div><br></div></div></div></span>
                =20
                =20
                =20
                =20
                </blockquote>
                =20
                <div>
                    <br>
                </div>
            
--4f96fc46_2ae8944a_15bd9--