i have created a controller with action subscribers
like this
class LeadsController extends SugarController
{
public function action_subscriber()
{
$this->view = 'sub';
}
}
and i have added a button callled as subscribers in my search form
now on click on that button if i want to make search happen so i am calling SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form); this two function in SearchFormGeneric.tpl
<input tabindex='2' title='go_select' id='go_select_b' ondblclick="SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form);" class='button' type='button' name='subscriber' value='Subscriber'/>
but when i click on the button its going to
module=Leads&action=index
i have my logic written in action called subscriber , so when i click on my custom button it should search with .
module=Leads&action=subscriber
so how can i change the action on click of "SUGAR.savedViews.setChooser(); SUGAR.ajaxUI.submitForm(this.form); this function
Search with this SUGAR.ajaxUI.submitForm(document.forms[‘DetailView’]); on post
i found one post related to this and i tried some thing like this SUGAR.ajaxUI.submitForm(document.forms[‘SubView’]);, but it did not work.
please can any one guide me on this ????
finally got the solution , so what we where trying was based on custom button on search view we were trying to modify the search .
so , go to search view under : suitecrm/custom/include/SearchForm/tpls/SearchFormGeneric.tpl
and add the button
and put the condition under the method where we are generating the list based in search condition
go to : suitecrm/custom/modules/o_order/views/view.list.php
the function which is generating the list data based on query is listViewProcess()
so we are passing the search condition to getpdf() function as parameter
that's it do repair and rebuild from the admin log in and you can see the changes .
hope this helps some one !