本文整理汇总了PHP中Q_Html::formInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP Q_Html::formInfo方法的具体用法?PHP Q_Html::formInfo怎么用?PHP Q_Html::formInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q_Html
的用法示例。
在下文中一共展示了Q_Html::formInfo方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Streams_publish_Broadcast_tool
function Streams_publish_Broadcast_tool($options)
{
extract($options);
$publisherId = $stream->publisherId;
$streamName = $stream->name;
$type = 'Broadcast';
$input = Q_Html::input('content', '');
$button = Q_Html::tag('button', array(), 'Post');
return Q_Html::form('Streams/stream', 'post', array(), Q_Html::formInfo(true) . Q_Html::hidden(compact('publisherId', 'streamName', 'type')) . Q::tool('Q/form', array('fields' => array('message' => array('type' => 'text', 'message' => 'this message will appear as if the user typed it before posting'), 'link' => array('type' => 'text', 'message' => 'the address of the webpage to share'), 'picture' => array('type' => 'text', 'message' => 'if you enter a picture url here, it will override the picture that is posted'), 'description' => array('type' => 'textarea', 'message' => 'if you enter something here, it will override the description that facebook would have automatically grabbed from that page'), '' => array('type' => 'button', 'value' => 'Post')), 'onSuccess' => 'Q.plugins.Broadcast.onBroadcastSuccess')));
}
示例2: array
<?php
echo Q_Html::div('tool', 'Users_contact_tool necessary panel');
?>
<?php
echo Q_Html::form($tool_action_url, 'post', array('class' => 'askEmail'));
?>
<?php
echo Q_Html::formInfo($onSuccess, null, $snf);
?>
<h3 class='feedback'>
We emailed your activation link to
<span class='email'><?php
echo $email->address;
?>
</span>.
</h3>
<p>Has it been a while and you didn't get anything? Have it re-sent:</p>
<label for="authorized_email">email address:</label>
<input id="authorized_email" name="emailAddress" type="text" />
<button type="submit" name="do_add" class="submit"><?php
echo $button_content;
?>
</button>
</form>
</div>
示例3: array
?>
<button type="submit" class="Users_login_start Q_main_button">Re-send activation message</button>
</form>
</div>
<?php
}
?>
<?php
} else {
?>
<div class="Q_register Q_big_prompt">
<?php
echo Q_Html::form(Q_Request::baseUrl() . '/action.php/Streams/invited');
?>
<?php
echo Q_Html::formInfo($stream_uri);
?>
<?php
echo Q_Html::hidden(array('token' => $invite->token, 'icon' => $thumbnail_url));
?>
<?php
echo Q::tool('Q/form', array('fields' => $fields));
?>
</form>
</div>
<?php
}
?>
</div>
<?php
if ($show_chat) {
示例4: array
A simple phrase consisting of a few words that
you will easily remember.
<?php
} else {
?>
Choose a good <strong>pass phrase</strong> to protect your account.
See the suggestions for some ideas.
<?php
}
?>
</p>
<?php
echo Q_Html::form(Q_Dispatcher::uri(), 'post', array('id' => 'Q_activation_form'));
?>
<?php
echo Q_Html::formInfo(null);
?>
<input type="password" id='activate_passphrase' name="passphrase" class='password' autofocus placeholder="Enter a passphrase" autocomplete="new-password" /><br>
<button type="submit" class="Q_button" style="width: 250px;">Activate My Account</button>
<input type="hidden" id="activate_identifier" name="<?php
echo $t;
?>
"
value="<?php
echo Q_Html::text($identifier);
?>
">
<input type="hidden" name="code" value="<?php
echo Q_Html::text($code);
?>
">
示例5: array
<?php
$prefix = Q_Html::getIdPrefix();
echo Q_Html::form(Q_Request::baseUrl() . '/action.php/Streams/basic', 'post');
echo Q_Html::formInfo(Q_Dispatcher::uri());
?>
<table>
<tr>
<td class="Q_field_title">
<label for="<?php
echo $prefix;
?>
firstName">First Name</label>
<?php
if ($showAccess) {
?>
<?php
echo Q::tool('Streams/access', array('readLevel' => Streams::my('Streams/user/firstName', 'readLevel'), 'streamName' => 'Streams/user/firstName', 'input_id' => Q_Html::id('firstName_readLevel')), 'firstName');
?>
<input type="hidden" name="firstName_readLevel"
id="<?php
echo Q_Html::id('firstName_readLevel');
?>
"
value="<?php
echo Streams::my('Streams/user/firstName', 'readLevel');
?>
">
示例6: Q_panel_tool
/**
* This tool generates a panel with a <form> tag inside it
* @class Q panel
* @constructor
* @param array $options
* An associative array of parameters, containing:
* "uri" => the uri or url the form should post to
* "method" => the method used to submit form
* "title" => the title of the panel
* "complete" => boolean, indicating whether the data on the server is in a complete state
* "editing" => boolean, indicating whether to show the form in the "editing" state
* "form" => string containing the contents of the form portion of the panel
* which is normally generated by a "Q/form" tool
* "static" => string containing the contents of the "static" portion
* "collapsed" => defaults to false. Whether the panel is shown as collapsed into just the header
* "toggle" => defaults to false. The events that cause toggling of collapsed state.
* If the string is 'click' then toggles the panel on clicks.
* If the string is 'move' then toggles the panel on mouseenter/mouseleave.
* "edit_button" => optional, to override the edit button
* "save_button" => optional, to override the save button
* "cancel_button" => optional, to override the cancel button
* "panel_classes" => optional, additional classes for the panel
* "snf" => optional. The name of the nonce field in the session
* "onSuccess" => optional. The URI to redirect to on success
* "onErrors" => optional. The URI to display if errors occur
* "inProcess" => optional. Causes the panel to appear as if it's a step in a process.
*/
function Q_panel_tool($options)
{
foreach (array('title', 'static', 'form') as $f) {
if (!array_key_exists($f, $options)) {
throw new Q_Exception_RequiredField(array('field' => '$' . $f));
}
}
$edit_button = "<button type='submit' class='basic16 basic16_edit Q_panel_tool_edit'>edit</button>";
$save_button = "<button type='submit' class='basic16 basic16_check Q_panel_tool_save'>save</button>";
$cancel_button = "<button type='reset' class='basic16 basic16_cancel Q_panel_tool_cancel'>cancel</button>";
$panel_classes = '';
$uri = null;
$method = 'post';
$collapsed = false;
$toggle = false;
$inProcess = false;
$onSuccess = null;
$onErrors = null;
$snf = null;
$static = null;
$form = null;
$editing = false;
$complete = false;
$setSlots = null;
extract($options, EXTR_OVERWRITE);
$more_class = $options['complete'] ? 'Q_panel_tool_complete' : 'Q_panel_tool_incomplete';
$panel_classes = "{$more_class} {$panel_classes}";
$title_div = "<div class='Q_panel_tool_title'>{$title}</div>";
if ($uri) {
$header = "<div class='Q_panel_tool_buttons'>{$save_button}{$cancel_button}{$edit_button}</div>{$title_div}";
} else {
$header = $title_div;
}
// Whether to display the panel one way or the other
if ($inProcess) {
$header = $title_div;
if (is_array($form)) {
$form['fields']['_Q_buttons'] = array('type' => 'buttons', 'label' => '', 'options' => array('continue' => 'Continue'), 'attributes' => array('class' => 'basic32 basic32_right', 'type' => 'submit'));
} else {
$form .= "<div class='Q_panel_tool_formbuttons'><button type='submit' class='Q_panel_tool_continue basic32 basic32_right' value='continue'>Continue</button></div>";
}
}
if (is_array($static)) {
foreach ($static['fields'] as $k => $f) {
if (Q::ifset($static, 'fields', $k, 'type', null)) {
switch ($static['fields'][$k]['type']) {
case 'textarea':
$static['fields'][$k]['value'] = str_replace("\n", "<br>", $static['fields'][$k]['value']);
break;
case 'date':
if (!isset($static['fields'][$k]['options']['date'])) {
$static['fields'][$k]['options']['date'] = "M j, Y";
}
break;
case 'buttons':
unset($static['fields'][$k]);
}
}
$static['fields'][$k]['type'] = 'static';
}
$static = Q::tool('Q/form', $static, array('id' => 'static'));
}
// Turn the form into a form
if (is_array($form)) {
$form['slotsToRequest'] = array('form', 'static');
$form['contentElements'] = array('form' => '.Q_panel_tool_form', 'static' => '.Q_panel_tool_static');
$form = Q::tool('Q/form', $form);
}
// Build the panel
$panel = "<div class='Q_panel_tool_header'>{$header}</div>" . "<div class='Q_panel_tool_form'>{$form}</div>";
if (isset($snf) or isset($onSuccess) or isset($onErrors)) {
$panel .= "<div>" . Q_Html::formInfo($onSuccess, $onErrors, $snf) . "</div>";
}
//.........这里部分代码省略.........
示例7: array
<?php
echo Q::tool('Q/form');
?>
<?php
echo Q_Html::formInfo(Q_Request::url());
?>
<?php
echo Q_Html::input('getintouch', 'true', array('type' => 'checkbox', 'checked' => !empty($getintouch) ? 'checked' : null, 'id' => 'getintouch'));
?>
<?php
echo Q_Html::hidden(array('publisherId' => $article->publisherId, 'name' => $article->name));
?>
<?php
echo Q_Html::label('getintouch', 'Provide ways to get in touch');
?>
<?php
echo Q_Html::buttons('submit', array('submit' => 'Submit'));