当前位置: 首页>>代码示例>>PHP>>正文


PHP RSFormProHelper::addOnClick方法代码示例

本文整理汇总了PHP中RSFormProHelper::addOnClick方法的典型用法代码示例。如果您正苦于以下问题:PHP RSFormProHelper::addOnClick方法的具体用法?PHP RSFormProHelper::addOnClick怎么用?PHP RSFormProHelper::addOnClick使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RSFormProHelper的用法示例。


在下文中一共展示了RSFormProHelper::addOnClick方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFrontComponentBody


//.........这里部分代码省略.........
             break;
         case 9:
         case 'fileUpload':
             $className = 'rsform-upload-box';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . (int) $data['FILESIZE'] . '000" />';
             $out .= '<input type="file" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 10:
         case 'freeText':
             $out .= $data['TEXT'];
             break;
         case 11:
         case 'hidden':
             $defaultValue = RSFormProHelper::isCode($data['DEFAULTVALUE']);
             $out .= '<input type="hidden" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" value="' . RSFormProHelper::htmlEscape($defaultValue) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 12:
         case 'imageButton':
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $className = 'btn rsform-image-button';
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES3'] = $data['ADDITIONALATTRIBUTES'];
             $pages = RSFormProHelper::componentExists($formId, 41);
             $pages = count($pages);
             if (!empty($pages)) {
                 if (empty($data['PREVBUTTON'])) {
                     $data['PREVBUTTON'] = JText::_('PREV');
                 }
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pages - 1) . ', ' . $pages . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES3'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
             }
             $out .= '<input type="image" src="' . RSFormProHelper::htmlEscape($data['IMAGEBUTTON']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             if ($data['RESET'] == 'YES') {
                 $className = 'btn rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 $out .= '<input type="reset" name="" id="reset_' . $data['NAME'] . '" style="display: none !important" />&nbsp;&nbsp;<input onclick="document.getElementById(\'reset_' . $data['NAME'] . '\').click();return false;" type="image" src="' . RSFormProHelper::htmlEscape($data['IMAGERESET']) . '" name="form[' . $data['NAME'] . ']" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             }
             break;
         case 13:
         case 'submitButton':
             $button_type = isset($data['BUTTONTYPE']) && $data['BUTTONTYPE'] == 'TYPEBUTTON' ? 'button' : 'input';
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $className = 'btn rsform-submit-button';
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES3'] = $data['ADDITIONALATTRIBUTES'];
             $last_submit = $componentId == end($data['SUBMITS']);
             $pages = RSFormProHelper::componentExists($formId, 41);
             $pages = count($pages);
             if (!empty($pages) && $last_submit) {
                 if (empty($data['PREVBUTTON'])) {
                     $data['PREVBUTTON'] = JText::_('PREV');
                 }
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pages - 1) . ', ' . $pages . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES3'], $onclick);
                 if ($button_type == 'button') {
                     $out .= '<button type="button" id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . '>' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '</button>';
                 } else {
                     $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
                 }
             }
             if ($button_type == 'button') {
开发者ID:renekreijveld,项目名称:rsformpro-bootstrapped,代码行数:67,代码来源:rsform.php

示例2: getFrontComponentBody


//.........这里部分代码省略.........
             break;
         case 9:
         case 'fileUpload':
             $className = 'rsform-upload-box';
             if ($invalid) {
                 $className .= ' rsform-error';
             }
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . (int) $data['FILESIZE'] . '000" />';
             $out .= '<input type="file" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 10:
         case 'freeText':
             $out .= $data['TEXT'];
             break;
         case 11:
         case 'hidden':
             $defaultValue = RSFormProHelper::isCode($data['DEFAULTVALUE']);
             $out .= '<input type="hidden" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" value="' . RSFormProHelper::htmlEscape($defaultValue) . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             break;
         case 12:
         case 'imageButton':
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $className = 'rsform-image-button';
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES3'] = $data['ADDITIONALATTRIBUTES'];
             $pages = RSFormProHelper::componentExists($formId, 41);
             $pages = count($pages);
             if (!empty($pages)) {
                 if (empty($data['PREVBUTTON'])) {
                     $data['PREVBUTTON'] = JText::_('PREV');
                 }
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pages - 1) . ', ' . $pages . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES3'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
             }
             $out .= '<input type="image" src="' . RSFormProHelper::htmlEscape($data['IMAGEBUTTON']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             if ($data['RESET'] == 'YES') {
                 $className = 'rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 $out .= '<input type="reset" name="" id="reset_' . $data['NAME'] . '" style="display: none !important" />&nbsp;&nbsp;<input onclick="document.getElementById(\'reset_' . $data['NAME'] . '\').click();return false;" type="image" src="' . RSFormProHelper::htmlEscape($data['IMAGERESET']) . '" name="form[' . $data['NAME'] . ']" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             }
             break;
         case 13:
         case 'submitButton':
             $data['ADDITIONALATTRIBUTES2'] = $data['ADDITIONALATTRIBUTES'];
             $className = 'rsform-submit-button';
             RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES'], $className);
             $data['ADDITIONALATTRIBUTES3'] = $data['ADDITIONALATTRIBUTES'];
             $last_submit = $componentId == end($data['SUBMITS']);
             $pages = RSFormProHelper::componentExists($formId, 41);
             $pages = count($pages);
             if (!empty($pages) && $last_submit) {
                 if (empty($data['PREVBUTTON'])) {
                     $data['PREVBUTTON'] = JText::_('PREV');
                 }
                 $onclick = 'rsfp_changePage(' . $formId . ', ' . ($pages - 1) . ', ' . $pages . ')';
                 RSFormProHelper::addOnClick($data['ADDITIONALATTRIBUTES3'], $onclick);
                 $out .= '<input type="button" value="' . RSFormProHelper::htmlEscape($data['PREVBUTTON']) . '"  id="' . $data['NAME'] . 'Prev" ' . $data['ADDITIONALATTRIBUTES3'] . ' />';
             }
             $out .= '<input type="submit" value="' . RSFormProHelper::htmlEscape($data['LABEL']) . '" name="form[' . $data['NAME'] . ']" id="' . $data['NAME'] . '" ' . $data['ADDITIONALATTRIBUTES'] . ' />';
             if ($data['RESET'] == 'YES') {
                 $className = 'rsform-reset-button';
                 RSFormProHelper::addClass($data['ADDITIONALATTRIBUTES2'], $className);
                 $out .= '&nbsp;&nbsp;<input type="reset" value="' . RSFormProHelper::htmlEscape($data['RESETLABEL']) . '" name="form[' . $data['NAME'] . ']" ' . $data['ADDITIONALATTRIBUTES2'] . ' />';
             }
开发者ID:atikahmed,项目名称:joomla-probid,代码行数:67,代码来源:rsform.php


注:本文中的RSFormProHelper::addOnClick方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。