Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 07, 2009, 02:40:36 PM
22771 Posts in 5216 Topics by 2974 Members
Latest Member: Vijitha
News: Do not post any jReviews files or large amounts of code in the forums please. Only template files and code are allowed.
 
jReviews Support Forum  |  jReviews 1.x  |  Templates  |  How to organize checkboxes in columns - custom fields « previous next »
Pages: [1]
Author Topic: How to organize checkboxes in columns - custom fields  (Read 4495 times)
Solari
Full Member
***
Offline Offline

Posts: 51


« on: August 31, 2006, 04:35:30 AM »

Greetings,

In one of my directories, I have a very long list of checkboxes (amneties) to be checked if a facility offers this or that.  The list is over 30 checkboxes long.

I was able to get the customfieldsform.html to just do one column rather than wrap everything into a big jumble, but to make it more visually pleasing, how do I get it to do two columns?

I tried doing a table thing around the options_checkboxes part of the template, but it didn't work - putting everything on one <td>. 

Thanks for any suggestions.
Ray
« Last Edit: October 18, 2006, 03:57:14 PM by jReviews » Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #1 on: August 31, 2006, 10:06:59 AM »

I don't think it is possible by just changing the template. The needs to be another outer template for it to work and the corresponding code that sends the output to the template has to be changed. Then you can have it work like the module which allows multiple columns, but here the columns will have to be manually hardcoded.

I had noticed this and will change it later on. Sorry I cannot be of more help this time.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #2 on: August 31, 2006, 12:22:39 PM »

Actually, I just thought about this again and you could do it similar to what you did for the 2-columns in the builders listing. Use <div> tags, set them to a fixed width and float them left. You can have as many columns as you want that way.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Solari
Full Member
***
Offline Offline

Posts: 51


« Reply #3 on: September 03, 2006, 09:48:34 PM »

Can you give me a little more detail on how I can accomplish this?

Thanks,
Ray
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #4 on: September 03, 2006, 10:02:38 PM »

<div style="width:49%; float:left>whatever is inside the options_checkboxes template</div>

Let us know if that works.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Solari
Full Member
***
Offline Offline

Posts: 51


« Reply #5 on: September 03, 2006, 11:04:07 PM »

Okay, but how do you alternate between right and left so that you have two columns?

It seems to loop so that you can only do one thing, i.e. list it either right or left.

Ray
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #6 on: September 03, 2006, 11:07:48 PM »

Make the percentage number smaller, try using a fixed with in pixels. No need to alternate anything. It will put divs in a single row until they no longer fit and then start on the next row....
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Solari
Full Member
***
Offline Offline

Posts: 51


« Reply #7 on: September 03, 2006, 11:16:26 PM »

Bingo. That did the trick.  Now the other thing I need to figure out is to fix that box that contains the custom fields - for some reason the div stuff makes it go outside the box:

www.virtualstjohns.com/component/option,com_jreviews/task,new/dir,6/section,16/cat,0/Itemid,105/
Logged
jhimwich
Jr. Member
**
Offline Offline

Posts: 33



« Reply #8 on: October 18, 2006, 03:52:41 PM »

Bingo. That did the trick.  Now the other thing I need to figure out is to fix that box that contains the custom fields - for some reason the div stuff makes it go outside the box:

www.virtualstjohns.com/component/option,com_jreviews/task,new/dir,6/section,16/cat,0/Itemid,105/

Also, don't forget to add the CLEAR tag to get rid of the float.

Starting with line 138, the code should look like the following (but with the width adjusted for your site's needs):

</patTemplate:tmpl>
      <br />
      <patTemplate:tmpl name="options_checkboxes" >
         <div style="padding-top: 10px; width:15%; float:left">
         <input type="checkbox" id="{NAME}" name="{NAME}[]" value="{VALUE}" {CHECKED}><span class="options">{TEXT}
         </span>
         </div>
      </patTemplate:tmpl>
      <p>
      <div style="clear: both"></div>
</patTemplate:sub>
Logged
moses5407
Jr. Member
**
Offline Offline

Posts: 30


« Reply #9 on: August 29, 2007, 02:06:39 AM »

I must be missing something here..but also would like to organize checkbox groups into multiple columns.

When I make the changes noted here, the checkboxes WITHIN a customfieldsbody rearrange themseleves...but the groups of customfieldsbody's do not.

For example..staying with the amenities issue..say there are checkboxes or radiobuttons for indoor grill, jacuzzi, solarium, outdoor grill.

the goal would be to have:

indoor grill                      Jacuzzi

Solarium                         Outdoor grill

as opposed to

Indoor Grill

Jacuzzi

Solarium

Outdoor Grill

Is this done thru a jreviews.css for customfoemsbodychange versus customfieldsform.html change? and, if so, can you give an example?

Thanks,
Jim


Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #10 on: August 29, 2007, 07:27:16 AM »

Ok, this is a really old one so I need to refresh my memory. Each field type has it's predefined template defined in customfieldsform.html, so the changes go there. Whatever you do to an input field will apply so every field of the same type. Not just for the checkbox used in category X.

Can you put up a screenshot of what you have accomplished so far because I didn't understand that and also the changes you made?
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
phobuz
Newbie
*
Offline Offline

Posts: 12


« Reply #11 on: February 21, 2008, 08:44:00 AM »

Is it possible to do this using template suffix? I

1. Made the changes directly in customfieldsform.html
2. Access the submit new item page and the checkboxes are columnized (see attachment Working.gif)
3. Made a copy of the changed customfieldsform.html and renamed the copy customfieldsform_restaurant.html
4. Return customfieldsform.html to default
5. Set the Template suffix of the menu item to access the submit new item page to "_restaurant"
6. Access the submit new item page and the checkboxes are not columnized (see attachment Not Working.gif)

I also set the Category suffix to "_restaurant" and it didn't work either.

I am using jReviews 1.2.08 and Joomla! 1.0.13.

Thanks,

Oliver
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #12 on: February 21, 2008, 04:01:49 PM »

No, customfieldsform.html does not inherit the suffix.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
foodiechica
Newbie
*
Offline Offline

Posts: 20


« Reply #13 on: May 23, 2008, 03:39:22 PM »

What if I just want to make this change in the advanced search module?
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8995


« Reply #14 on: May 25, 2008, 07:14:24 PM »

You wouldn't change the customfieldsform for this. I recommend you add your field to the module template, look at the browser source for the module, copy the part that makes your checkbox field and then use it directly in the module and format it anyway you want. I am not sure if you understand, but you can basically put any form html you want in the advanced search form template, you are not forced to use the {JR_FIELD} tags only. The important thing is that you assign the correct names to the inputs you add so they are processed during the search.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
Pages: [1]
« previous next »
    Jump to: