Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] horizontal formbuilder
On 5/20/05, Andrew Wooldridge <andrew.r.wooldridge@vanderbilt.edu> wrote:
> Justin et. al, please advise.
>=20
> Currently writing a form using formbuilder to insert multiple rows in a
> single table with one form using the useForm() method.  Look at the
> example below of what I want the form to look like.  Should I write my
> own getForm(), or is there a way to customize with
> pre/postGenerateForm() to output everything horizontally on one line?
>=20
> Thanks! -Andy
>=20
> I want the HTML code to look like:
>         <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox1</b></td>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox2</b></td>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox3</b></td>
>          </tr>
>=20
>         <tr>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field1[=
1]"
> type=3D"checkbox" value=3D"1" id=3D"qf_6dd127" /></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field2[=
1]"
> type=3D"checkbox" value=3D"1" id=3D"qf_d0b905" /></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field3[=
1]"
> type=3D"checkbox" value=3D"1" id=3D"qf_030dd7" /></td>
>          </tr>
>=20
>         <tr>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field1[=
2]"
> type=3D"checkbox" value=3D"1" id=3D"qf_6dd127" /></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field2[=
2]"
> type=3D"checkbox" value=3D"1" id=3D"qf_d0b905" /></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field3[=
2]"
> type=3D"checkbox" value=3D"1" id=3D"qf_030dd7" /></td>
>          </tr>
>=20
>          <tr>
>                  <td align=3D"right" valign=3D"top"><b></b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"__submi=
t__"
> value=3D"Submit" type=3D"submit" /></td>
>          </tr>
>=20
>=20
>=20
>=20
> Not like FormBuilder default getForm which outputs:
>         <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox1</b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field1[=
1]"
> type=3D"checkbox" value=3D"1" id=3D"qf_6dd127" /></td>
>          </tr>
>          <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox2</b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field2[=
1]"
> type=3D"checkbox" value=3D"1" id=3D"qf_d0b905" /></td>
>          </tr>
>          <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox3</b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field3[=
1]"
> type=3D"checkbox" value=3D"1" id=3D"qf_030dd7" /></td>
>          </tr>
>=20
>         <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox1</b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field1[=
2]"
> type=3D"checkbox" value=3D"1" id=3D"qf_6dd127" /></td>
>          </tr>
>          <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox2</b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field2[=
2]"
> type=3D"checkbox" value=3D"1" id=3D"qf_d0b905" /></td>
>          </tr>
>          <tr>
>                  <td align=3D"right" valign=3D"top"><b>Checkbox3</b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"field3[=
2]"
> type=3D"checkbox" value=3D"1" id=3D"qf_030dd7" /></td>
>          </tr>
>=20
>          <tr>
>                  <td align=3D"right" valign=3D"top"><b></b></td>
>                  <td valign=3D"top" align=3D"left"><input name=3D"__submi=
t__"
> value=3D"Submit" type=3D"submit" /></td>
>          </tr>
>=20

First and foremost, FormBuilder doesn't support elements with [ or ]
in their names, Second, FormBuilder builds forms for DB_DataObjects
and I've never seen a field name in a DB with [ or ] in it.

Third, what you're building here looks like a tripleLink. I suggest
you look more into that. The Audio Formats element on th epage below
is a tripleLink:
http://pear.reversefold.com/

You can get an example here:
http://pear.reversefold.com/example.tgz

--=20
Justin Patrin

Report this thread to moderator Post Follow-up to this message
Old Post
Justin Patrin
05-27-05 01:59 AM


Re: Re: [PEAR] horizontal formbuilder
On May 20, 2005, at 6:10 PM, Justin Patrin wrote:

> On 5/20/05, Andrew Wooldridge <andrew.r.wooldridge@vanderbilt.edu>
> wrote: 
>
> First and foremost, FormBuilder doesn't support elements with [ or ]
> in their names, Second, FormBuilder builds forms for DB_DataObjects
> and I've never seen a field name in a DB with [ or ] in it.
>
> Third, what you're building here looks like a tripleLink. I suggest
> you look more into that. The Audio Formats element on th epage below
> is a tripleLink:
> http://pear.reversefold.com/
>
> You can get an example here:
> http://pear.reversefold.com/example.tgz
>
> --
> Justin Patrin
>
>

Thanks for the pointers.

You're absolutely correct about the bracket characters.  I was
modifying the names of the dataobject elements to make an HTML array
per the first example on this page:
http://lists.nyphp.org/pipermail/fr...ry/000196.html.
I think tripleLink is the more elegant solution that I'm looking for.

Follow-up Question: If I need more field types than just checkboxes in
each row, then I should use crosslinks, like the 'Songs' in your
example?

-A

Report this thread to moderator Post Follow-up to this message
Old Post
Andrew Wooldridge
05-27-05 01:59 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 10:24 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.