[MOD] Search Forms ...
 
Notifications
Clear all

[MOD] Search Forms w/ CheckBoxes and Collapsing Groupings (Idea)

5 Posts
4 Users
0 Reactions
2,464 Views
(@piper)
Posts: 91
Trusted Member
Topic starter
 

Hi there.

I've just finished modifying my "Advanced Search" page.

http://www.tgfiction.net/eFiction30Beta/search4.php?searchtype=advanced

What I have done is changed the Include/Exclude Multi-Select lists into CheckBox groupings. I have compressed the page using Collapsible DIV sections using JavaScript.

I'm also looking at doing a similar mod to my Story Submission/Edit Form.

Is anyone else interested in this? I could release the info on how to do it, and maybe some of my modified files.

http://www.tgfiction.net/eFiction30Beta/search2.php?searchtype=advanced

That's the original check-box mod I made, before the version that is now the Collapsible version. Unfortunately I didn't save a copy of the version that I had of what I have now, but without the collapsible boxes. If there is interest in that, I can provide it too.

-HuGgLeS-
-P/KAF/PT


StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

 
Posted : 25/07/2009 12:57 am
(@wimvincken)
Posts: 44
Eminent Member
 

Very much interested. It must not a problem to share it with the community.

Great work, looks amazing and I would be very happy to adopt this with my site.


 
Posted : 10/08/2009 5:36 am
(@saharrashadow)
Posts: 9
Active Member
 

Yes. This is extremely interesting. I would love to be able to use this on my site. Did you ever post the information?


 
Posted : 23/10/2010 5:46 pm
(@piper)
Posts: 91
Trusted Member
Topic starter
 

I posted this to another thread, but thought I should post this here also... Below you will find the basic steps needed to move from multiple select boxes, to check boxes on your advances search and story submission forms....

In the file: search.php

On or about line 301, change:

 $select .= "<option value="".$class['class_id']."">".$class['class_name']."</option>";

to

$select .= "<input type="checkbox" name="class_".$type['classtype_id']."[]" id="class_".$type['classtype_id']."[]"value="".$class['class_id']."">".$class['class_name']."<br />";

On or about lines 304-307 change:

 <div style="float: left; width: 49%; margin-bottom: 1em;"><label for="class_".$type['classtype_id']."">".$type['classtype_title']." "._INCLUDE.":</label><br />
                                       <select name="class_".$type['classtype_id']."[]" id="class_".$type['classtype_id'].""  style="width: 95%;" multiple size="5">$select</select></div>
                              <div style="float: left; width: 49%; margin-bottom: 1em;"><label for="exclass_".$type['classtype_id']."">".$type['classtype_title']." "._EXCLUDE.":</label><br />
                                       <select name="exclass_".$type['classtype_id']."[]"  id="exclass_".$type['classtype_id'].""  style="width: 95%;" multiple size="5">$select</select></div>

to

<div style="float: left; width: 49%; margin-bottom: 1em;"><fieldset for="class_".$type['classtype_id'].""><legend>".$type['classtype_title']." "._INCLUDE.":</legend><br />
                                       $select</fieldset></div>
                              <div style="float: left; width: 49%; margin-bottom: 1em;"><fieldset for="exclass_".$type['classtype_id'].""><legend>".$type['classtype_title']." "._EXCLUDE.":</legend><br />
                                       $select</fieldset></div>

That should give you the basic check boxes as seen in search2.php @ TGFiction.Net

The collapsing boxes were done using spy widget I included somewhere else -giggles- I will add that information once I sort it all out....

Now for the submission form....  Something isn't working right when I try to diff it, so let me wing it here....

In the file: includes/storyform.php

On or about lines 120-123, change:

                                $select .= "<option value="$class[class_id]"".(is_array($classes) && in_array($class['class_id'], $classes) ? " selected" : "").">$class[class_name]</option>";
               }
               $output .= "<div style="float: ".($count % 2 ? "right" : "left")."; width: 49%; margin-bottom: 1em;"><label for="class_".$type['classtype_id']."">$type[classtype_title]:</label><br />
                                <select name="class_".$type['classtype_id']."[]" id="class_".$type['classtype_id'].""  style="width: 99%;" multiple size="5">$select</select></div>";

to

                        $select .= "<input type="checkbox" value="$class[class_id]"".(is_array($classes) && in_array($class['class_id'], $classes) ? " checked" : "")." name="class_".$type['classtype_id']."[]" id="class_".$type['classtype_id']."">$class[class_name]<br />";
               }
               $output .= "<div style="float: ".($count % 2 ? "right" : "left")."; width: 49%; margin-bottom: 1em;">
                       <fieldset for="class_".$type['classtype_id'].""><legend>".$type['classtype_title'].":</legend><br />
                       $select</FIELDSET></div>";

And I think that's about it...

Let me know if you need more.

-HuGgLES-
-P/KAF/PT


StoryPortal Fiction Network - StoryPortal.Net
TG Fiction dot NET | T* Fiction Archive - TGFiction.Net
LG Tales | TG Style Fiction for LG's - LGTales.Com

 
Posted : 13/01/2011 8:22 pm
(@guest9540)
Posts: 0
 

This code worked great except there are still boxes above the checklists, is there a way to get rid of them?


 
Posted : 07/05/2011 7:24 pm
Share: