本文整理汇总了PHP中form_format函数的典型用法代码示例。如果您正苦于以下问题:PHP form_format函数的具体用法?PHP form_format怎么用?PHP form_format使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了form_format函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: anchor
<h3>Manage Content</h3>
<?/*echo anchor('conventionnext/create/candidate','Add Candidate');?><br/>
<?echo anchor('admin/view','view all');*/?>
<br />
<?php
echo form_open('admin/');
?>
<?
$format = array(
'name' => 'cms_name',
'id' => 'cms_name',
'value' => (isset($cms_name))?$cms_name:$this->validation->cms_name,
'size' => '50',
'class' => 'txt',
);
echo form_format("Name: ",form_input($format),'The name of the page of content, will be used in the URL' );
?>
<br />
<br />
<br />
<?
$oFCKeditor = new FCKeditor('cms_text') ;
$sBasePath = 'fckeditor/';
$oFCKeditor->BasePath = $sBasePath ;
$oFCKeditor->Height = '400';
$oFCKeditor->Value = (isset($cms_text))?$cms_text:$this->validation->cms_text;
$oFCKeditor->Create() ;
?>
<br />
<?php
echo form_hidden('cms_id', $cms_id);
示例2: getForm
/**
* this function will take serialized data
* and return a form
*
* @param serialized $data
* @param int $rc row colum grid id
* @return string $html
* @author James Kleinschnitz
**/
function getForm($data, $rc)
{
$html = '';
$data = unserialize($data);
//assume it is a feed parse it for data
$html .= "<div class='mainform'>\n";
$html .= '<h1>' . $rc . '(ColumnRow)<h1>';
$html .= form_open('mainpage/edit/' . $rc);
$html .= form_format("Name: *", form_input('name', isset($data['name']) ? $data['name'] : '', 'class="txt"'));
$html .= form_format("Feed: *", form_input('feed', isset($data['feed']) ? $data['feed'] : '', 'class="txt"'));
$html .= form_format("Title: *", form_checkbox('title', 'TRUE', isset($data['title']) ? TRUE : FALSE));
$html .= form_format("Description: *", form_checkbox('desc', 'TRUE', isset($data['desc']) ? TRUE : FALSE));
$html .= form_format("Description Limit: *", form_input('desc_limit', isset($data['desc_limit']) ? $data['desc_limit'] : '', 'class="txt"'));
$html .= form_format("# Items: *", form_input('items', isset($data['items']) ? $data['items'] : '', 'class="txt"'));
$html .= form_hidden('colrow', $rc);
//if ($data['custom'])
//$html .= form_format("Delete Pod: *",form_checkbox('delete', 'TRUE', FALSE));
$html .= "<br />\n";
$html .= form_submit('', 'Save', 'class="button"');
$html .= form_close();
$html .= "</div>\n";
return $html;
}
示例3: form_format
?>
')" >Today</a></p>
<?//echo form_format("Sunlight ID:",form_input('sunlight_id','','class="txt"') ); ?>
<?//echo form_format("Event Date: *",form_input('event_date','','class="txt"') ); ?>
<?
$format = array(
'name' => 'location',
'id' => 'location',
'value' => $this->validation->location,
'rows' => '3',
'cols' => '48',
'class' => 'txt'
);
echo form_format("Event Location: *",form_textarea($format),'Write a description of the event location, directions etc.' );
?>
<br /><br />
<br /><br />
<?php
echo form_submit('', 'Create Event', 'class="button"');
?>
<br /><br />
<small>* required fields</small>
<?php
echo form_close();
?>
</div>
示例4: form_format
echo form_format("Low Stream Code: ", form_textarea($format));
$format = array(
'name' => 'blocked_ips',
'value' => $this->validation->blocked_ips,
'rows' => '5',
'cols' => '48',
'class' => 'txt',
);
echo form_format("Blocked IPs: ", form_textarea($format));
$format = array(
'0' => 'no',
'1' => 'yes',
);
echo form_format("Streaming:", form_dropdown('streaming', $format, $this->validation->streaming));
echo form_format("Event Finished:", form_dropdown('event_finished', $format, $this->validation->event_finished));
?>
<br /><br />
<br /><br />
<?php
echo isset($avatar_image_name) && !empty($avatar_image_name) ? form_hidden('old_avatar', './avatars/' . $avatar_image_name) : '';
?>
<?php
echo form_submit('', 'Update Event', 'class="button"');
?>
<br /><br />
<small>* required fields</small>
<?php
echo form_close();
?>
</div>
示例5: form_format
</div>
<? echo form_format("Question:",anchor("question/view/{$event['event_url_name']}/".url_title($question['question_name']),$question['question_name']),'' ); ?>
<? echo form_format("Question Status: *",$dropdown,'' ); ?>
<?
// Show Question Answer text box if the questions is either current or asked
if ($question['question_status'] == 'current' || $question['question_status'] == 'asked')
{
$format = array(
'name' => 'question_answer',
'id' => 'question_answer',
'value' => $question['question_answer'],
'rows' => '6',
'cols' => '65',
'class' => 'txt'
);
echo form_format("Question Answer: *",form_textarea($format),'Write a the answer to the question.' );
}
?>
<? echo form_hidden("question_id",$question['question_id']); ?>
<? echo form_hidden("event_url_name",$event['event_url_name']); ?>
<br /><br />
<?php
echo form_submit('', 'Edit Question', 'class="button"');
?>
<?php
echo form_close();
?>
</div>
<? $this->load->view('view_layout/footer.php'); ?>
示例6: exit
<?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
?>
<?
$data['sub_title'] = "Password Reset";
?>
<? $this->load->view('view_layout/header.php',$data); ?>
<div id="content_div">
<div class='errorArea'><?php
echo $error;
?>
</div>
<?php
echo form_open('user/password_reset_form');
?>
<?php
echo form_format('Your e-mail address: ', form_input(array('name' => 'user_email', 'class' => 'txt')));
?>
<?php
echo form_submit(array('class' => 'button', 'value' => 'Reset Password'));
?>
<?php
echo form_close();
?>
</div>
<?$this->load->view('view_layout/footer.php');?>
示例7: form_format
echo $question['question_id'];
?>
_0" style="display: block;margin-left:30px;margin-top:10px;">
<?php
echo form_format("", "<b>Selcet a question as result.</b><br><br>");
echo form_format("", form_dropdown('result_question_' . $question['question_id'], $result_question_array));
?>
</div>
<div id="other_questions_<?php
echo $question['question_id'];
?>
_1" style="display: none;margin-left:30px;margin-top:10px;">
<?php
echo form_format("", "<b>Select other duplicate questions.</b><br><br>");
foreach ($other_question_array as $k => $data) {
echo form_format("", form_checkbox($data));
echo $data['label'] . '<br>';
}
?>
</div>
</div>
<br /><br />
<input type="button" class="button" value="Flag Question" onclick="new Ajax.Request(site_url+'flag/flagQuestion/<?php
echo $question['question_id'];
?>
/<?php
echo $this->session->userdata['user_id'];
?>
/flag', { parameters: $('question_flag_form_<?php
echo $question['question_id'];
?>
示例8: form_open
<?
$data['red_head'] = 'Add comment';
?>
<?$this->load->view('view_includes/header.php',$data);?>
<div id="content_div">
<h3>Add a comment</h3>
<?
echo form_open('comment/addCommentAction')
. form_format("Your comment: ",form_input('comment','','class="txt"') )
. form_hidden('fk_question_id', $question_id)
. form_hidden('event_type', $event_type)
. form_hidden('question_name', $question_name)
. '<input type="submit" value="Submit Comment"/>'
. form_close();
?>
</div>
<?$this->load->view('view_includes/footer.php');?>
示例9: exit
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
?>
<? $this->load->view('view_layout/header.php',$data); ?>
<div id="content_div">
<h3>Reset Password</h3>
<div class='errorArea'><?php
echo $error;
?>
</div>
<?php
echo form_open('user/reset_password_form', '', array('user_id' => $user_id, 'auth' => $auth));
?>
<?php
echo form_format('New password: ', form_password(array('name' => 'user_password', 'class' => 'txt')));
?>
<?php
echo form_format('Confirm new password: ', form_password(array('name' => 'user_password_confirm', 'class' => 'txt')));
?>
<?php
echo form_submit(array('class' => 'button', 'value' => 'Reset Password'));
?>
<?php
echo form_close();
?>
</div>
<?$this->load->view('view_layout/footer.php');?>
示例10: form_open
echo $error;
?>
</div>
<div id="account_form">
<?php
echo form_open('user/edit_user_action/' . $user_id);
?>
<?php
echo form_format("User Name: *", form_input('user_name', $this->validation->user_name, 'class="txt"'));
?>
<?php
echo form_format("Password: *", form_input('user_password', $this->validation->user_password, 'class="txt"'));
?>
<?php
echo form_format("Avatar:", form_input('user_avatar', $this->validation->user_avatar, 'class="txt"'));
?>
<br /><br />
<br /><br />
<?php
echo form_submit('', 'Edit User', 'class="button"');
?>
<br /><br />
<small>* required fields</small>
<?php
echo form_close();
?>
</div>
</div>
示例11: form_format
'cols' => '48',
'class' => 'txt'
);
echo form_format("Description: ",form_textarea($format),'Write a brief description explaining your question (limit 250 chars).' );
?>
<br />
<?
$format = array(
'name' => 'tags',
'id' => 'tags',
'value' => $this->validation->tags,
'size' => '48',
'class' => 'txt',
'style' => 'text-transform:lowercase'
);
echo form_format("Tags: ",form_input($format),'Short, generic words separated by spaces example: abortion war politics' );
?>
<br />
<br />
<?php
echo form_hidden('submitted', 'true');
?>
<?php
echo form_hidden('event_url', $event_url);
?>
<div class="link" onclick="showBox('disclaimer');">Disclaimer</div>
<br />
<? if(isset($ajax)): ?>
<a onClick="javascript:cpUpdater.askQuestion();">Submit Question</a>
<? else: ?>
<?php
示例12: form_format
<?//= form_format('Candidate Name: ', form_input($can_name_attrs)) ?>
<?php
echo form_format('Candidate Display Name: ', form_input($can_display_name_attrs));
?>
<?php
echo $action == 'create' ? form_format('Password: ', form_password($can_password_attrs)) : '';
?>
<?php
echo $action == 'create' ? form_format('Confirm Password: ', form_password($can_password_confirm_attrs)) : '';
?>
<?php
echo form_format('Biography: ', form_textarea($can_bio_attrs));
?>
<?php
echo $action == 'create' ? form_format('Email: ', form_input($can_email_attrs)) : '';
?>
<?php
echo form_hidden('submitted', 'true');
?>
<p><?php
echo form_submit(null, $submit_text, 'class="button"');
?>
</p>
<?php
echo form_close();
?>
</div>
<? $this->load->view('view_includes/footer.php'); ?>
示例13: form_submit
<br/>
<?php
echo form_submit('', 'Get a One Time Account', 'class="button"');
?>
<?php
echo form_close();
?>
<br/> <h2>Log in</h2>
<?php
echo form_open('user/login');
?>
<?php
echo form_format("Username: ", form_input('user_name', '', 'class="txt_user" id="username"'));
?>
<?php
echo form_format("Password: ", form_password('user_password', '', 'class="txt_user"'));
?>
<?php
echo form_hidden('redirect', $this->uri->uri_string());
?>
<br /><br /><?php
echo form_submit('', 'Login', 'class="button"');
?>
<div id="userloginprompt"><small>You must have cookies enabled to log in to OpenFloor</small></div>
<?php
echo form_close();
?>
<? /*<br /><?php
echo anchor('/user/password_reset', 'Forgot your username or password?', 'class="link"');
?>
*/?>
示例14: array
$format1 = array(
'name' => 'custom_1',
'id' => 'custom_1',
'value' => (isset($custom_1))?$custom_1:$this->validation->custom_1,
'size' => '50',
'class' => 'txt',
);
echo form_format("Custom 1: ",form_input($format1),'Additional field to store information if needed' );
$format2 = array(
'name' => 'custom_2',
'id' => 'custom_2',
'value' => (isset($custom_2))?$custom_2:$this->validation->custom_2,
'size' => '50',
'class' => 'txt',
);
echo form_format("Custom 2: ",form_input($format2),'Additional field to store information if needed' );
?>
<br /><br />
<?php
echo form_hidden('cms_id', $cms_id);
?>
<?php
echo form_submit('', 'Submit', 'class="button"');
?>
<?php
echo form_close();
?>
</div>
<? $this->load->view('view_includes/footer.php',$data); ?>
示例15: form_format
<? } ?>
<?php
echo form_format("Username: *", form_input('user_name', isset($this->validation->user_name) ? $this->validation->user_name : '', 'class="txt"'));
?>
<? if ( !isset($openID) ) echo form_format("Password: *",form_password('user_password','','class="txt"') ); ?>
<? if ( !isset($openID) ) echo form_format("Password Confirm: *",form_password('password_confirm','','class="txt"') ); ?>
<?
if (isset($openID_email)) $email = $openID_email;
else if (isset($this->validation->user_email)) $email = $this->validation->user_email;
else $email= '';
?>
<?php
echo form_format("Email: *", form_input('user_email', $email, 'class="txt"'));
?>
<br /><br />
<?
echo $capimage;
echo '<br />';
echo '<label>Enter the above characters: *</label>';
echo form_input('captcha','','class="txt"')
?>
<br /><br />
<?php
echo form_submit('', 'Create Account', 'class="button"');
?>
<br /><br />