• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP text_field函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中text_field函数的典型用法代码示例。如果您正苦于以下问题:PHP text_field函数的具体用法?PHP text_field怎么用?PHP text_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: input

function input($objectName, $method, $object, $options = array())
{
    $attr = $object->getAttribute($method);
    switch ($attr->type) {
        case 'string':
            $str = text_field($objectName, $method, $object, $options);
            break;
        case 'text':
            $str = text_area($objectName, $method, $object, $options);
            break;
        case 'date':
            $str = date_select($objectName, $method, $object);
            break;
        case 'datetime':
            $str = date_time_select($objectName, $method, $object);
            break;
        case 'integer':
            $str = text_field($objectName, $method, $object, $options);
            break;
        case 'float':
            $str = text_field($objectName, $method, $object, $options);
            break;
        case 'boolean':
            $str = check_box($objectName, $method, $object, $options);
            break;
        default:
            $str = hidden_field($objectName, $method, $object);
            break;
    }
    return error_wrapping($str, isset($object->errors[$method]));
}
开发者ID:BackupTheBerlios,项目名称:stato-svn,代码行数:31,代码来源:record_helper.php


示例2: testTextfield

 public function testTextfield()
 {
     $this->assertDomEqual(text_field('post', 'title', $this->post), '<input id="post_title" name="post[title]" size="30" type="text" value="PHP for ever" />');
     $this->assertDomEqual(password_field('post', 'title', $this->post), '<input id="post_title" name="post[title]" size="30" type="password" value="PHP for ever" />');
     $this->assertDomEqual(file_field('post', 'title', $this->post), '<input id="post_title" name="post[title]" type="file" />');
     $this->assertDomEqual(text_field('post', 'title', $this->post, array('size' => 35, 'maxlength' => 35)), '<input id="post_title" name="post[title]" size="35" maxlength="35" type="text" value="PHP for ever" />');
     $this->assertDomEqual(text_field('post', 'title', $this->post, array('index' => 2)), '<input id="post_2_title" name="post[2][title]" size="30" type="text" value="PHP for ever" />');
 }
开发者ID:BackupTheBerlios,项目名称:stato-svn,代码行数:8,代码来源:form_helper.test.php


示例3: content

function content()
{
    if (!user_logged_in()) {
        return must_log_in();
    }
    $user = fetch_one_or_none('users', 'id', user_logged_in());
    $errors = array();
    if (array_key_exists('change', $_POST)) {
        if (!isset($_POST['email']) || !$_POST['email']) {
            $errors[] = "Please enter an email address";
        } else {
            $email = $_POST['email'];
            if ($email && !validate_email_address($email)) {
                $errors[] = "Invalid email address";
            }
            if (count($errors) == 0 && count(fetch_all('users', 'email_address', $email))) {
                $errors[] = "A user with this email address already exists";
            }
            if (count($errors) == 0) {
                update_all('users', array('new_email_address' => $email), 'id', user_logged_in());
                send_email_change_email($email, $user->name);
                ?>
        <p>We have sent an email to your new address requesting that you
          confirm that change of address.</p>
        <?php 
                return;
            }
        }
    }
    $fields = array();
    page_header('Change email address');
    show_error_list($errors);
    ?>
 
    <form method="post" action="" accept-charset="UTF-8">
      <div class="fieldrow">
        <div class="field">
          <label>Current address:</label>
          <div><tt><?php 
    esc($user->email_address);
    ?>
</tt></div>
        </div>
      </div>

      <div class="fieldrow">
        <?php 
    text_field($fields, 'email', 'New address');
    ?>
      </div>

      <div class="fieldrow">
        <input type="submit" name="change" value="Change"/>
      </div>
    </form>
  <?php 
}
开发者ID:ras52,项目名称:geneopedia,代码行数:57,代码来源:change-email.php


示例4: content

function content()
{
    global $errors;
    ?>

  <h2>Login</h2>

  <p>If you have not yet registered for an account, you will need to
    <a href="register">register</a> before you can log in.
    If you have have forgotten your password, you can
    <a href="request-reset">reset it</a>.</p>

  <?php 
    show_error_list($errors);
    ?>

    <form method="post" action="" accept-charset="UTF-8">
      <div class="fieldrow">
        <?php 
    text_field($_POST, 'email', 'Email address');
    ?>
      </div>

      <div class="fieldrow">
        <div>
          <label for="password">Password</label>
          <input type="password" id="password" name="password" />
        </div>
      </div>

      <div class="fieldrow">
        <input type="checkbox" id="forever" name="forever" value="1"
               checked="checked" />
        <label for="forever">Stay logged in?
          <br/><span class="label-extra">If you are using a shared computer,
          you should not set this option.</span></label>
      </div>

      <div class="fieldrow">
        <input type="submit" name="login" value="Login" />
        <br/><span class="note">(This sets a cookie,
          which logging out clears.)</span>
      </div>
      <?php 
    if (array_key_exists('return', $_GET)) {
        hidden_field('return', $_GET['return']);
    } elseif (array_key_exists('return', $_POST)) {
        hidden_field('return', $_POST['return']);
    }
    ?>
    </form>
<?php 
}
开发者ID:ras52,项目名称:geneopedia,代码行数:53,代码来源:login.php


示例5: display_column

function display_column($label, $row, $col_name, $editable = TRUE)
{
    print "<tr>\n";
    print "<td>" . htmlspecialchars($label) . "</td>\n";
    print "<td>";
    if ($editable) {
        # display as editable field
        text_field("row[{$col_name}]", $row[$col_name], 80);
    } else {
        # display as read-only text
        print htmlspecialchars($row[$col_name]);
    }
    print "</td>\n";
    print "</tr>\n";
}
开发者ID:Eric-Shih-Hsuan,项目名称:DB-Interface-Stuff,代码行数:15,代码来源:edit_member.php


示例6: field_html

 function field_html($args, $arrSlide = array())
 {
     switch ($args['type']) {
         case 'textarea':
             return text_area($args, $arrSlide);
         case 'checkbox':
             return checkbox_field($args, $arrSlide);
         case 'select':
             return select_field($args, $arrSlide);
         case 'image':
             return image_field($args, $arrSlide);
         default:
             return text_field($args, $arrSlide);
     }
 }
开发者ID:fwelections,项目名称:fwelections,代码行数:15,代码来源:inc.fields.sliderfields.php


示例7: field_html

function field_html($args)
{
    switch ($args[2]) {
        case 'textarea':
            return text_area($args);
        case 'checkbox':
        case 'radio':
        case 'button':
        case 'text':
            return text_button($args);
        case 'submit':
        default:
            return text_field($args);
    }
}
开发者ID:zakaria340,项目名称:critique,代码行数:15,代码来源:custom_fields.php


示例8: field_html

function field_html($args)
{
    switch ($args[2]) {
        case 'textarea':
            return text_area($args);
        case 'checkbox':
            // To Do
        // To Do
        case 'radio':
            // To Do
        // To Do
        case 'text':
        default:
            return text_field($args);
    }
}
开发者ID:Vinnica,项目名称:theboxerboston.com,代码行数:16,代码来源:custom_fields.php


示例9: content

function content()
{
    $errors = array();
    page_header('Request password reset');
    if (array_key_exists('reset', $_POST)) {
        if (!isset($_POST['email']) || !$_POST['email']) {
            $errors[] = "Please enter an email address";
        } else {
            $user = fetch_one_or_none('users', 'email_address', $_POST['email']);
            if (!$user) {
                $errors[] = "Incorrect email address supplied";
            }
            if (count($errors) == 0) {
                $token = make_random_token();
                update_all('users', array('activation_token' => $token), 'id', $user->id);
                send_reset_email($user->email_address, $user->name, $token);
                ?>
        <p>We have sent you an email containing a link allowing you to reset 
          your password.</p>
        <?php 
                return;
            }
        }
    }
    ?>
    <p>If you have forgotten your password and need it resetting, please 
      enter your email address below and we will send you an email allowing 
      you to reset your password.</p>

    <?php 
    show_error_list($errors);
    ?>
 
    <form method="post" action="" accept-charset="UTF-8">
      <div class="fieldrow">
        <?php 
    text_field($_POST, 'email', 'Email address');
    ?>
      </div>

      <div class="fieldrow">
        <input type="submit" name="reset" value="Reset" />
      </div>
    </form>
<?php 
}
开发者ID:ras52,项目名称:geneopedia,代码行数:46,代码来源:request-reset.php


示例10: field_html

function field_html($args)
{
    switch ($args[2]) {
        case 'textarea':
            return text_area($args);
        case 'checkbox':
            // Checkbox
            return check_box($args);
        case 'background_variant':
            // Dropmenu
            return background_variant($args);
        case 'image_url':
            // Image URL
            return image_url($args);
        case 'text':
        default:
            return text_field($args);
    }
}
开发者ID:nishant368,项目名称:newlifeoffice-new,代码行数:19,代码来源:admin-page.php


示例11: render

 /**
  * Renders attachment based on Object type
  *
  * @param void
  * @return string
  */
 function render($element_name)
 {
     switch ($this->getRelObjectManager()) {
         case 'Companies':
         case 'Contacts':
         case 'ProjectFiles':
         case 'ProjectMessages':
         case 'ProjectMilestones':
         case 'ProjectTasks':
         case 'ProjectTaskLists':
         case 'ProjectTickets':
             return text_field($element_name, $this->getText());
             break;
         default:
             return textarea_field($element_name, $this->getText(), array('class' => 'short'));
             break;
     }
     // switch
 }
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:25,代码来源:PageAttachment.class.php


示例12: project_tabbed_navigation

  project_tabbed_navigation(PROJECT_TAB_FORMS);
  project_crumbs(array(
    array(lang('forms'), get_url('form')),
    array($project_form->isNew() ? lang('add form') : lang('edit form'))
  ));
  //add_stylesheet_to_page('project/forms.css');
  
?>
<form class="internalForm" action="<?php echo $project_form->isNew() ? get_url('form', 'add') : $project_form->getEditUrl() ?>" method="post">


<?php tpl_display(get_template_path('form_errors')) ?>

  <div>
    <?php echo label_tag(lang('name'), 'projectFormName', true) ?>
    <?php echo text_field('project_form[name]', array_var($project_form_data, 'name'), array('id' => 'projectFormName', 'class' => 'long')) ?>
  </div>
  
  <div>
    <?php echo label_tag(lang('description'), 'projectFormDescription') ?>
    <?php echo textarea_field('project_form[description]', array_var($project_form_data, 'description'), array('id' => 'projectFormDescription', 'class' => 'short')) ?>
  </div>
  
  <div>
    <?php echo label_tag(lang('success message'), 'projectFormSuccessMessage',true) ?>
    <?php echo textarea_field('project_form[success_message]', array_var($project_form_data, 'success_message'), array('id' => 'projectFormSuccessMessage', 'class' => 'short')) ?>
  </div>
  
  <div class="formBlock" id="projectFormAction">
    <fieldset>
      <legend><?php echo lang('project form action') ?></legend>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:add_project_form.php


示例13: tpl_display

"></script>
<div id="massMailer">
  <form action="<?php 
echo $tool->getToolUrl();
?>
" method="post">
<?php 
tpl_display(get_template_path('form_errors'));
?>
  
    <div>
      <?php 
echo label_tag(lang('massmailer subject'), 'massmailerFormRecipient', true);
?>
      <?php 
echo text_field('massmailer[subject]', array_var($massmailer_data, 'subject'), array('id' => 'massmailerFormRecipient', 'class' => 'title'));
?>
    </div>
    
    <div>
      <?php 
echo label_tag(lang('massmailer message'), 'massmailerFormMessage', true);
?>
      <?php 
echo textarea_field('massmailer[message]', array_var($massmailer_data, 'message'), array('id' => 'massmailerFormMessage', 'class' => 'editor'));
?>
    </div>
    
    <h2><?php 
echo lang('massmailer recipients');
?>
开发者ID:ukd1,项目名称:Project-Pier,代码行数:31,代码来源:tool_mass_mailer.php


示例14: administration_crumbs

administration_crumbs(array(array(lang('administration tools'), get_url('administration', 'tools')), array($tool->getDisplayName())));
?>
<form action="<?php 
echo $tool->getToolUrl();
?>
" method="post">
<?php 
tpl_display(get_template_path('form_errors'));
?>

  <div>
    <?php 
echo label_tag(lang('test mail recipient'), 'testMailFormRecipient', true);
?>
    <?php 
echo text_field('test_mail[recipient]', array_var($test_mail_data, 'recipient'), array('id' => 'testMailFormRecipient', 'class' => 'long'));
?>
  </div>
  
  <div>
    <?php 
echo label_tag(lang('test mail message'), 'testMailFormMessage', true);
?>
    <?php 
echo textarea_field('test_mail[message]', array_var($test_mail_data, 'message'), array('id' => 'testMailFormMessage'));
?>
  </div>
  
  <?php 
echo submit_button(lang('submit'));
?>
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:tool_test_email.php


示例15: lang

echo $message->isNew() ? lang('new message') : lang('edit message');
?>
		</td><td style="text-align:right">
			<?php 
echo submit_button($message->isNew() ? lang('add message') : lang('save changes'), 's', array('style' => 'margin-top:0px;margin-left:10px', 'tabindex' => '5'));
?>
		</td></tr></table>
	</div>
	
	</div>
	<div>
	<?php 
echo label_tag(lang('title'), $genid . 'messageFormTitle', true);
?>
	<?php 
echo text_field('message[title]', array_var($message_data, 'title'), array('id' => $genid . 'messageFormTitle', 'class' => 'title', 'tabindex' => '1'));
?>
	</div>
	
	<?php 
$categories = array();
Hook::fire('object_edit_categories', $object, $categories);
?>
	
	<div style="padding-top:5px">
		<?php 
if ($all) {
    ?>
			<a href="#" class="option" style="font-weight:bold" onclick="og.toggleAndBolden('<?php 
    echo $genid;
    ?>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:add_message.php


示例16: select_workspaces

</h2></th>
	</tr>
	<tr>
	<td style="padding: 5px;"></td>
	<td style="padding: 5px;">
	<?php 
echo select_workspaces("ws_ids", null, $selected, $genid);
?>
	</td>
	<td style="padding: 5px;">  
<?php 
echo "<p>" . lang("assign contact to workspace desc") . "</p><br />";
foreach ($projects as $project) {
    echo '<div id="role_' . $project->getId() . '_' . $genid . '" style="display:none">';
    echo label_tag(lang("role"), null, false, array("style" => "display:inline;padding-right:10px"));
    echo text_field("contact[role_pid_" . $project->getId() . "]", array_var($contact_data, 'role_pid_' . $project->getId()), array('tabindex' => '20'));
    echo '</div>';
}
?>
	
	</td>
</table>
<?php 
echo submit_button(lang('update contact'));
?>
</div>
</div>


</form>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:30,代码来源:assign_to_project.php


示例17: project_object_tags_widget

/**
 * Return project object tags widget
 *
 * @param string $name
 * @param Project $project
 * @param string $value
 * @Param array $attributes Array of control attributes
 * @return string
 */
function project_object_tags_widget($name, Project $project, $value, $attributes)
{
    return text_field($name, $value, $attributes) . '<br /><span class="desc">' . lang('tags widget description') . '</span>';
}
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:13,代码来源:application.php


示例18: text_field

        <?php 
        }
    }
    ?>
      </ul>
    </div>
    <?php 
}
?>
	<?php 
echo text_field($this->entity, "id");
?>

	<?php 
echo datetime_field($this->entity, "created_at");
?>

	<?php 
echo datetime_field($this->entity, "updated_at");
?>

	<?php 
echo text_field($this->entity, "email");
?>



	<input  type ="submit" value="Save" />
	
<?php 
echo form_end_tag();
开发者ID:quyen91,项目名称:lfpr,代码行数:31,代码来源:_form.html.php


示例19: set_page_title

<?php set_page_title(lang('forgot password')) ?>
<form action="<?php echo get_url('access', 'forgot_password') ?>" method="post">
<?php tpl_display(get_template_path('form_errors')) ?>
  <div style="padding-top: 4px;">
    <?php echo label_tag(lang('email address'), 'forgotPasswordEmail')  ?>
    <?php echo text_field('your_email', $your_email, array('style' => 'width: 348px;', 'id' => 'forgotPasswordEmail')) ?>
  </div>
  <input type="hidden" name="submitted" value="submitted" />
  <div id="forgotPasswordSubmit"><?php echo submit_button(lang('email me my password')) ?></div>
  <div><a href="<?php echo get_url('access', 'login') ?>"><?php echo lang('login') ?></a></div>
</form>
<script>document.forms[0].forgotPasswordEmail.focus()</script>
开发者ID:rjv,项目名称:Project-Pier,代码行数:12,代码来源:forgot_password.php


示例20: label_tag

  <div>
    <?php 
echo label_tag(lang('email address'), 'profileFormEmail', true);
?>
    <?php 
echo text_field('user[email]', array_var($user_data, 'email'), array('id' => 'profileFormEmail', 'tabindex' => '2700', 'class' => 'long'));
?>
  </div>
  
  
  <div>
    <?php 
echo label_tag(lang('user title'), 'profileFormTitle');
?>
    <?php 
echo text_field('user[title]', array_var($user_data, 'title'), array('id' => 'profileFormTitle', 'tabindex' => '2800'));
?>
  </div>
  
  	<?php 
if ($cps > 0) {
    ?>
  	<div id='<?php 
    echo $genid;
    ?>
add_custom_properties_div' style="">
		<fieldset>
			<legend><?php 
    echo lang('custom properties');
    ?>
</legend>
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:31,代码来源:edit_profile.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP text_field_tag函数代码示例发布时间:2022-05-23
下一篇:
PHP text_area函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap