sql consult in joomla - joomla

I have a form in my personalize HTML module in joomla
<form id="search-restaurant" class="form-a" action="find.php">
<div>
......
</div>
<div class="encuentra-tastepoint-submit"><input type="submit" value="Submit" /></div>
When I click on Submit button I want to execute a sql query in my data base and return the value in other page.
Where I have to put muy find.php file.
There is a manual or tutorial to do that in joomla 2.5
Thanks

I assume the find.php is the file that contains the code for the SQL queries in which case, you can keep it in the root of the module folder (in the same location as the module.xml).
You will also need to add require_once( dirname(__FILE__).'/'.'find.php' ); to your_module.php.

Related

WIX: Add custom HTML or my own form (to another website)

I need to create a form that by clicking on it will redirect to another website with special 'inputs' tags values.
something like:
<form action="http://example.com" method="post">
<input type="hidden" name="val1" value="something">
<input type="hidden" name="val2" value="else">
<input type="submit" name="submit" value="Go">
</form>
The custom HTML feature that I find will put it inside an iframe, and it looks bad. Is there a way to do it that will look 'normal'?
If you utilize Wix Code you can develop that inside your Wix page without the need of any html forms.
Simple solution:
- Add the form input elements you need on your page
- Add a button to click on
- Add av event handler to the button and grab the values from the input fields
- Send that data to any site or redirect the user to the site you want using wixLocation.to("url") with the query parameters you might need from the form.

Prevent TinyMce in Joomla to modify inserted html code

I'm using joomla (last version) and just added this template in tinymce :
<a href="/test" class="darkimagediv">
<img src="/images/logo2.png">
<div>
<div>
Test
</div>
</div>
</a>
It displays fine in the popup dialog just before inserting, but when I do it is inserted like that:
<p><a class="darkimagediv" href="test"> <img src="images/logo2.png" /></a></p>
<div>
<div>Test</div>
</div>
<p> </p>
Which is very bad.
I'm superuser and text filtering is off in the global configuration. I don't find any cleanup option in tinymce, so I need to find which script modify my html but I don't even know if I must search tinymce or joomla itself.
If you are pasting code Don't use a rich text editor.
The editor is doing what it is supposed to and correcting your incorrect markup. Either way, if you want to insert markup, incorrect or not, then don't use a rich text editor.

site link search box shopify

I want to include an input box on site A; after I type in the query and press Enter, open a new tab to display the search results of B. It would be as if I had typed the search query into B directly.
Set up a form to handle the search. Make it's action parameter the address of site B's search handler. Give it a target attribute of _blank
e.g.
<form action="https://storeB.myshopify.com/search" method="GET" target="_blank">
<input name="q" type="text">
<input type="submit" value="Submit">
</form>
These are the basics. You can match the look of your current site by adapting the code from your theme. The code to look at may be in your theme's folders under templates/search.liquid.

How to remove summery box in magento review form

I have remove the summery box magento product review form. but when i submit the review it still says "Review summary can't be empty". i thought there is server side validation in magento.
anyone help me how can i remove the validation for summery box in product review from
Magento doesn't provide this as a option. But, you can go into template template/review/form.phtml and hide displaying summary field and set some value for it:
<li style="display: none">
<label for="summary_field" class="required"><em>*</em><?php echo $this->__('Summary of Your Review') ?></label>
<div class="input-box">
<input type="text" name="title" id="summary_field" class="input-text required-entry" value="SOMEVALUE" />
</div>
</li>
Magento engine uses client site and server site validation for processing any kinds of form. If you want remove this field completely you need to overwrite core functionality. The following steps should help you.
To stop server site validation
copy the file app/code/core/Mage/Review/Model/Review.php to app/code/local/Mage/Review/Model/Review.php
search the validate method in the copied file(around line number 118)
see the line $errors[] = Mage::helper('review')->__('Review summary can\'t be empty');
and comment this line
To stop client site validation
go to the file template/review/form.phtml in your theme folder.
and remove/hide displaying summary field

CS CART call a controller at add on front end with microformat ajax

I am very new to cs cart. I have read their documentation about calling Ajax with form micrformats. I am able to create a Ajax request. But I would like to call a controller inside my add-on controllers/frondend/ directory names as mycheckout.php. I am using the a hidden file dispatch with the valu mycheckout.mymode. Can any one help me. I actually want to perform some action in my controller. But their documentation did not help me. Thanks in advance.
You can do something like this (use extra "cm-ajax-force" or "cm-ajax-full-render" classes if needed):
<form class="cm-ajax" name="your_name" action="{""|fn_url}" method="post">
<input type="hidden" name="result_ids" value="div_id_to_be_updated" />
{include file="buttons/go.tpl" but_name="mycheckout.mymode" alt=__("Ajax button")}
</form>
Or you can use any button you want (even <input type="submit" name="mychechkout.mymode" value="Ajax!">)
Note that the Ajax request can be also done via simple link:
<a class="cm-ajax cm-post" href="{"mycheckout.mymode?param1=value1&param2=value2"|fn_url}" data-ca-target-id="div_id_to_be_updated">Ajax!</a>

Resources