Good Morning,
OK, please note than I'm a hack at heart...
Joomla 1.5.10 / ChronoForms_V3.1_RC4.11 / WAMP Server
Been trying to implement the Smoothbox here: http://www.chronoengine.com/forums.html?cont=posts&f=12&t=12019
And the Search example here: http://www.chronoengine.com/forums.html?cont=posts&f=12&t=11737&st=0&sk=t&sd=a&start=15#p21937
I have the following set up:
Where
Header
Body
The display is dead-on what I need on the frontend, but the issues I'm having are...
1.) When displaying the data inside of the smoothbox pop-up, it's displaying the wrong data??? instead of pulling the data from the table for each item. For instance, the document name is correct in the header of the pop-up, it pulls that for each item, but the other data associated with that item is wrong. 🤨
- SOLVED BELOW - 2.) The links inside the smoothbox pop-up are not active links. How would I make that happen? So that the URL links would be a live URL links, and the file links (to PDFs, DOCs, ZIPs) would link you to the file associated?
3.) For {new_record}, I've tried to link to add the same form as attached, including bringing in the script tags / links to the css and javascript files pulled from the view source of the actual document submit form page. I would like to have the {add_record} function identically to the actual form (then I wouldn't need the other). It looks the same, but it doesn't validate any of the required items, and the data doesn't save to the database?
4.) For {delete_record}, is there a way to prompt for confirmation before actually deleting the record? Clicking by accident could be an issue.
- SOLVED BELOW - 5.) The Search item isn't working, but I'm a little unclear how to fix it. In the array, I understand that I need to list out the fields that I would like to search, but how do I get it to actually search those fields on Submit? Right now, I click Submit and nothing happens, the page just reloads with all data shown. *PARTIAL EDIT* Realized that the search will return items if i set it back to only search {document} for instance, and only if I start typing the first few letters, it won't return any results if it's a search for a second word in a title for instance. So a search for "Dog" will return "Dogma and Goat Cheese", but not "Goat Cheese and Dogma".
6.) I see filtering in the General Tab, but don't know how this works? Ability to allow users to sort the columns? That would be great if that's an option?
Thanks for any help!
-Jonathon
OK, please note than I'm a hack at heart...
Joomla 1.5.10 / ChronoForms_V3.1_RC4.11 / WAMP Server
Been trying to implement the Smoothbox here: http://www.chronoengine.com/forums.html?cont=posts&f=12&t=12019
And the Search example here: http://www.chronoengine.com/forums.html?cont=posts&f=12&t=11737&st=0&sk=t&sd=a&start=15#p21937
I have the following set up:
Where
<?php
$search_array = array('document', 'publication', 'author');
$where = array();
foreach ( $search_array as $search ) {
$value = JRequest::getVar($search, '' , 'post');
if ( $value ) {
$where[] = " $search LIKE '$value%' ";
}
}
if ( !empty($where) ) {
echo " WHERE ".implode(' AND ', $where);
}?>
Header
<div style="float:left"><b>Search KHC Documents Database.</b></div><div style="float:left">
<b>Document/Publication/Author</b>: <input type="text" name="undefined"><input type="submit" value="Search" name="undefined" style='width:80px; color:#cccccc; background-color:#222222; cursor:pointer;' /></div>
<br /><br />
Documents listed alphabetically:
<br />
<table style="text-align: left; width: 600px;" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td style="font-weight: bold; width: 5%;">#</td>
<td style="font-weight: bold; width: 30%;">Document</td>
<td style="font-weight: bold; width: 25%;">Author</td>
<td style="font-weight: bold; width: 25%;">Publication</td>
<td style="font-weight: bold; width: 15%;">Year</td>
</tr>
</tbody>
</table>
<div class="clr" style="border-bottom: 3px solid #222; padding: 3px; margin-bottom: 10px;"></div>
Body
<p class="blocknumber">
<span class="bignumber">
<table style="text-align: left; width: 650px;" border="0" cellpadding="2" cellspacing="0">
<tbody>
<tr>
<td style="font-weight: bold; width: 32%;"><?php echo sprintf('%02s', (1 + $counter)); ?></span><a class="smoothbox" name="<b>KHC Document Review</b> - {document}" href="#TB_inline?height=400&width=500&inlineId=cccontent_{id}_box" id="cccontent_{id}" > {document}</a></td>
<td style="width: 23%;">{author}</td>
<td style="width: 23%;">{publication}</td>
<td style="width: 7%;">{year}</td>
<td style="width: 20%;">{delete_record} / {edit_record}</td>
</tr>
</tbody>
</table></p>
<div id="cccontent_{id}_box" style="display: none;">
<br><br>
<b>Document Name</b>: {document}<br>
<b>Author</b>: {author}<br>
<b>Publisher</b>: {publication}<br>
<b>Year</b>: {year}<br><br>
<b>File</b>: {fileupload}<br><br>
<b>URL</b>: {website}<br><br>
<b>Researched?</b> {radio3}<br>
<b>Peer Reviewed?</b> {radio4}<br><br>
<b>Description</b>: {description}<br><br>
<b>Notes</b>: {notes}<br><br>
<b>Categories</b>: {check2}
</div>
<hr color="#f2f2f2">
The display is dead-on what I need on the frontend, but the issues I'm having are...
1.) When displaying the data inside of the smoothbox pop-up, it's displaying the wrong data??? instead of pulling the data from the table for each item. For instance, the document name is correct in the header of the pop-up, it pulls that for each item, but the other data associated with that item is wrong. 🤨
- SOLVED BELOW - 2.) The links inside the smoothbox pop-up are not active links. How would I make that happen? So that the URL links would be a live URL links, and the file links (to PDFs, DOCs, ZIPs) would link you to the file associated?
3.) For {new_record}, I've tried to link to add the same form as attached, including bringing in the script tags / links to the css and javascript files pulled from the view source of the actual document submit form page. I would like to have the {add_record} function identically to the actual form (then I wouldn't need the other). It looks the same, but it doesn't validate any of the required items, and the data doesn't save to the database?
4.) For {delete_record}, is there a way to prompt for confirmation before actually deleting the record? Clicking by accident could be an issue.
- SOLVED BELOW - 5.) The Search item isn't working, but I'm a little unclear how to fix it. In the array, I understand that I need to list out the fields that I would like to search, but how do I get it to actually search those fields on Submit? Right now, I click Submit and nothing happens, the page just reloads with all data shown. *PARTIAL EDIT* Realized that the search will return items if i set it back to only search {document} for instance, and only if I start typing the first few letters, it won't return any results if it's a search for a second word in a title for instance. So a search for "Dog" will return "Dogma and Goat Cheese", but not "Goat Cheese and Dogma".
6.) I see filtering in the General Tab, but don't know how this works? Ability to allow users to sort the columns? That would be great if that's an option?
Thanks for any help!
-Jonathon