當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FabrikHelperHTML::autoCompletOptions方法代碼示例

本文整理匯總了PHP中FabrikHelperHTML::autoCompletOptions方法的典型用法代碼示例。如果您正苦於以下問題:PHP FabrikHelperHTML::autoCompletOptions方法的具體用法?PHP FabrikHelperHTML::autoCompletOptions怎麽用?PHP FabrikHelperHTML::autoCompletOptions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FabrikHelperHTML的用法示例。


在下文中一共展示了FabrikHelperHTML::autoCompletOptions方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: autoComplete

 /**
  * Add autocomplete JS code to head
  * @param string $htmlid of element to turn into autocomplete
  * @param int $elementid
  * @param string $plugin
  * @param array $opts (currently only takes 'onSelection')
  */
 public function autoComplete($htmlid, $elementid, $plugin = 'field', $opts = array())
 {
     FabrikHelperHTML::autoCompleteScript();
     $json = FabrikHelperHTML::autoCompletOptions($htmlid, $elementid, $plugin, $opts);
     $str = json_encode($json);
     FabrikHelperHTML::addScriptDeclaration("head.ready(function() { new FbAutocomplete('{$htmlid}', {$str}); });");
 }
開發者ID:nickbunyan,項目名稱:fabrik,代碼行數:14,代碼來源:html.php

示例2: elementJavascriptOpts

 function elementJavascriptOpts($repeatCounter)
 {
     $params =& $this->getParams();
     $element = $this->getElement();
     $opts = $this->_getOptionVals();
     $data =& $this->_form->_data;
     $arSelected = $this->getValue($data, $repeatCounter);
     $arVals = $this->getSubOptionValues();
     $arTxt = $this->getSubOptionLabels();
     $table = $params->get('join_db_name');
     $opts =& $this->getElementJSOptions($repeatCounter);
     $forms =& $this->getLinkedForms();
     $popupform = $params->get('databasejoin_popupform');
     $popuplistid = empty($popupform) || !isset($forms[$popupform]) ? '' : $forms[$popupform]->listid;
     $opts->id = $this->_id;
     $opts->key = $table . "___" . $params->get('join_key_column');
     $opts->label = $table . "___" . $params->get('join_val_column');
     $opts->formid = $this->getForm()->getForm()->id;
     $opts->listid = $popuplistid;
     $opts->value = $arSelected;
     $opts->defaultVal = $this->getDefaultValue($data);
     $opts->popupform = $popupform;
     $opts->popwiny = $params->get('yoffset', 0);
     $opts->display_type = $params->get('database_join_display_type', 'dropdown');
     $opts->windowwidth = $params->get('join_popupwidth', 360);
     $opts->displayType = $params->get('database_join_display_type', 'dropdown');
     $opts->show_please_select = $params->get('database_join_show_please_select');
     $opts->showDesc = $params->get('join_desc_column') === '' ? false : true;
     $opts->autoCompleteOpts = $opts->display_type == 'auto-complete' ? FabrikHelperHTML::autoCompletOptions($opts->id, $this->getElement()->id, 'databasejoin') : null;
     $opts->allowadd = $params->get('fabrikdatabasejoin_frontend_add', 0) == 0 ? false : true;
     if ($this->isJoin()) {
         $join =& $this->getJoin();
         $opts->elementName = $join->table_join;
         $opts->elementShortName = $element->name;
     }
     $opts = json_encode($opts);
     return $opts;
 }
開發者ID:nine007,項目名稱:fabrik,代碼行數:38,代碼來源:databasejoin.php

示例3: autoComplete

 /**
  * Add autocomplete JS code to head
  * @param string $htmlid of element to turn into autocomplete
  * @param int $elementid
  * @param string $plugin
  * @param array $opts (currently only takes 'onSelection')
  */
 public function autoComplete($htmlid, $elementid, $plugin = 'fabrikfield', $opts = array())
 {
     FabrikHelperHTML::autoCompleteScript();
     $json = FabrikHelperHTML::autoCompletOptions($htmlid, $elementid, $plugin, $opts);
     $str = FastJSON::encode($json);
     FabrikHelperHTML::addScriptDeclaration("window.addEvent('domready', function() { new FabAutocomplete('{$htmlid}', {$str}); });");
 }
開發者ID:nikshade,項目名稱:fabrik21,代碼行數:14,代碼來源:html.php


注:本文中的FabrikHelperHTML::autoCompletOptions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。