-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckbox_8php_source.html
104 lines (102 loc) · 19.6 KB
/
checkbox_8php_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GravityView: checkbox.php Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="custom-doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GravityView
 <span id="projectnumber">2.17</span>
</div>
<div id="projectbrief">The best, easiest way to display Gravity Forms entries on your website.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_096b0de097b3e98f91191e9d894d4363.html">templates</a></li><li class="navelem"><a class="el" href="dir_ec5b3714d0ece4d73a2deb1322dd37b1.html">deprecated</a></li><li class="navelem"><a class="el" href="dir_b0d46e1b4744c0c00581e2eaaee03bdd.html">fields</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">checkbox.php</div> </div>
</div><!--header-->
<div class="contents">
<a href="checkbox_8php.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <?php<span class="comment"></span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment">/**</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Checkbox field output</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * @package GravityView</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * @subpackage GravityView/templates/fields</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> */</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"><a class="line" href="checkbox_8php.html#add47a7f886e74847997a4044e9903a0a"> 10</a></span> <a class="code" href="checkbox_8php.html#add47a7f886e74847997a4044e9903a0a">$gravityview_view</a> = <a class="code" href="class_gravity_view___view.html#a675d8b1454543d5bcef330c3686aff61">GravityView_View::getInstance</a>();</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> extract( <a class="code" href="checkbox_8php.html#add47a7f886e74847997a4044e9903a0a">$gravityview_view</a>->getCurrentField() );</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> </div><div class="line"><a name="l00014"></a><span class="lineno"><a class="line" href="checkbox_8php.html#a7134cf200a7dab6fd996fea23cf969bf"> 14</a></span> <a class="code" href="checkbox_8php.html#a7134cf200a7dab6fd996fea23cf969bf">$is_single_input</a> = floor( <a class="code" href="time_8php.html#a391bb7936af986b27b996d1a6c2e142c">$field_id</a> ) !== floatval( <a class="code" href="time_8php.html#a391bb7936af986b27b996d1a6c2e142c">$field_id</a> );</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797"> 16</a></span> <a class="code" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a> = <span class="stringliteral">''</span>;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="keywordflow">if</span>( ! <a class="code" href="checkbox_8php.html#a7134cf200a7dab6fd996fea23cf969bf">$is_single_input</a> ) {</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <a class="code" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a> = <a class="code" href="class-api_8php.html#a023eaeb09f343deeb696cb198f1667dd">gravityview_get_field_value</a>( <a class="code" href="notes_8php.html#aa5233ed44daaa56d417d58cc4d8f64c2">$entry</a>, <a class="code" href="time_8php.html#a391bb7936af986b27b996d1a6c2e142c">$field_id</a>, <a class="code" href="field-address-csv_8php.html#a3bc46d9836191735ed5edee7c38b3722">$display_value</a> );</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="checkbox_8php.html#a309540e58a5dd9f0de65dd5cd94e35bc"> 20</a></span> } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <a class="code" href="radio_8php.html#a1235cd5adeb38c87e768d2f664d27dd5">$display_type</a> = <a class="code" href="class_g_v_1_1_utils.html#a744ef7454e48c5521c4c3ad3cf1b700b">\GV\Utils::get</a>( <a class="code" href="custom_8php.html#a925f4d60d2d907ebcc3f42e72d5356de">$field_settings</a>, <span class="stringliteral">'choice_display'</span> );</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> </div><div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="checkbox_8php.html#abd8615909223c22bd7f77a6919b10ab6"> 24</a></span>  <a class="code" href="checkbox_8php.html#abd8615909223c22bd7f77a6919b10ab6">$field_value</a> = <a class="code" href="class-api_8php.html#a023eaeb09f343deeb696cb198f1667dd">gravityview_get_field_value</a>( <a class="code" href="notes_8php.html#aa5233ed44daaa56d417d58cc4d8f64c2">$entry</a>, <a class="code" href="time_8php.html#a391bb7936af986b27b996d1a6c2e142c">$field_id</a>, <a class="code" href="field-address-csv_8php.html#a3bc46d9836191735ed5edee7c38b3722">$display_value</a> );</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> </div><div class="line"><a name="l00026"></a><span class="lineno"><a class="line" href="checkbox_8php.html#ae3d2cf16a317e3cb31214f733c032b33"> 26</a></span>  <span class="keywordflow">switch</span>( <a class="code" href="radio_8php.html#a1235cd5adeb38c87e768d2f664d27dd5">$display_type</a> ) {</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  <span class="keywordflow">case</span> <span class="stringliteral">'value'</span>:</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  <a class="code" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a> = <a class="code" href="checkbox_8php.html#abd8615909223c22bd7f77a6919b10ab6">$field_value</a>;</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <span class="keywordflow">case</span> <span class="stringliteral">'label'</span>:</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <a class="code" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a> = <a class="code" href="connector-functions_8php.html#a30fc40197ef6a05ee04965c58100e5df">gravityview_get_field_label</a>( <a class="code" href="namespace_g_v.html#a91e7726d3809355b12b0634174bbaf76">$form</a>, <a class="code" href="time_8php.html#a391bb7936af986b27b996d1a6c2e142c">$field_id</a>, <a class="code" href="search-field-date__range_8php.html#a4016dad482628807137e0d337ac1cbc4">$value</a> );</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">case</span> <span class="stringliteral">'tick'</span>:</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  <span class="keywordflow">default</span>: <span class="comment">// Backward compatibility</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="keywordflow">if</span>( <span class="stringliteral">''</span> !== <a class="code" href="checkbox_8php.html#abd8615909223c22bd7f77a6919b10ab6">$field_value</a> ) {<span class="comment"></span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="comment"> /**</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="comment"> * @filter `gravityview_field_tick` Change the output for a checkbox "check" symbol. Default is the "dashicons-yes" icon</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="comment"> * @see https://developer.wordpress.org/resource/dashicons/#yes</span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="comment"> *</span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="comment"> * @param string $output HTML span with `dashicons dashicons-yes` class</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="comment"> * @param array $entry Gravity Forms entry array</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="comment"> * @param array $field GravityView field array</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="comment"> */</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a> = apply_filters( <span class="stringliteral">'gravityview_field_tick'</span>, <span class="stringliteral">'<span class="dashicons dashicons-yes"></span>'</span>, <a class="code" href="notes_8php.html#aa5233ed44daaa56d417d58cc4d8f64c2">$entry</a>, <a class="code" href="search-field-chainedselect_8php.html#a83e4d6721f3491a4fd780dbd3ce1a3c0">$field</a> );</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  }</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  }</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> echo <a class="code" href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a>;</div><div class="ttc" id="connector-functions_8php_html_a30fc40197ef6a05ee04965c58100e5df"><div class="ttname"><a href="connector-functions_8php.html#a30fc40197ef6a05ee04965c58100e5df">gravityview_get_field_label</a></div><div class="ttdeci">gravityview_get_field_label( $form, $field_id, $field_value='')</div><div class="ttdoc">Retrieve the label of a given field id (for a specific form) </div><div class="ttdef"><b>Definition:</b> <a href="connector-functions_8php_source.html#l00130">connector-functions.php:130</a></div></div>
<div class="ttc" id="class-api_8php_html_a023eaeb09f343deeb696cb198f1667dd"><div class="ttname"><a href="class-api_8php.html#a023eaeb09f343deeb696cb198f1667dd">gravityview_get_field_value</a></div><div class="ttdeci">gravityview_get_field_value( $entry, $field_id, $display_value)</div><div class="ttdoc">Handle getting values for complex Gravity Forms fields. </div><div class="ttdef"><b>Definition:</b> <a href="class-api_8php_source.html#l01034">class-api.php:1034</a></div></div>
<div class="ttc" id="checkbox_8php_html_a7134cf200a7dab6fd996fea23cf969bf"><div class="ttname"><a href="checkbox_8php.html#a7134cf200a7dab6fd996fea23cf969bf">$is_single_input</a></div><div class="ttdeci">$is_single_input</div><div class="ttdef"><b>Definition:</b> <a href="checkbox_8php_source.html#l00014">checkbox.php:14</a></div></div>
<div class="ttc" id="class_gravity_view___view_html_a675d8b1454543d5bcef330c3686aff61"><div class="ttname"><a href="class_gravity_view___view.html#a675d8b1454543d5bcef330c3686aff61">GravityView_View\getInstance</a></div><div class="ttdeci">static getInstance( $passed_post=NULL)</div><div class="ttdef"><b>Definition:</b> <a href="class-template_8php_source.html#l00195">class-template.php:195</a></div></div>
<div class="ttc" id="checkbox_8php_html_add47a7f886e74847997a4044e9903a0a"><div class="ttname"><a href="checkbox_8php.html#add47a7f886e74847997a4044e9903a0a">$gravityview_view</a></div><div class="ttdeci">$gravityview_view</div><div class="ttdef"><b>Definition:</b> <a href="checkbox_8php_source.html#l00010">checkbox.php:10</a></div></div>
<div class="ttc" id="field-address-csv_8php_html_a3bc46d9836191735ed5edee7c38b3722"><div class="ttname"><a href="field-address-csv_8php.html#a3bc46d9836191735ed5edee7c38b3722">$display_value</a></div><div class="ttdeci">$display_value</div><div class="ttdef"><b>Definition:</b> <a href="field-address-csv_8php_source.html#l00017">field-address-csv.php:17</a></div></div>
<div class="ttc" id="custom_8php_html_a925f4d60d2d907ebcc3f42e72d5356de"><div class="ttname"><a href="custom_8php.html#a925f4d60d2d907ebcc3f42e72d5356de">$field_settings</a></div><div class="ttdeci">$field_settings['content']</div><div class="ttdef"><b>Definition:</b> <a href="custom_8php_source.html#l00027">custom.php:27</a></div></div>
<div class="ttc" id="namespace_g_v_html_a91e7726d3809355b12b0634174bbaf76"><div class="ttname"><a href="namespace_g_v.html#a91e7726d3809355b12b0634174bbaf76">GV\$form</a></div><div class="ttdeci">if(gravityview() ->plugin->is_GF_25()) $form</div><div class="ttdef"><b>Definition:</b> <a href="class-gv-settings-plugin_8php_source.html#l00526">class-gv-settings-plugin.php:526</a></div></div>
<div class="ttc" id="search-field-chainedselect_8php_html_a83e4d6721f3491a4fd780dbd3ce1a3c0"><div class="ttname"><a href="search-field-chainedselect_8php.html#a83e4d6721f3491a4fd780dbd3ce1a3c0">$field</a></div><div class="ttdeci">$field</div><div class="ttdef"><b>Definition:</b> <a href="search-field-chainedselect_8php_source.html#l00029">search-field-chainedselect.php:29</a></div></div>
<div class="ttc" id="search-field-date__range_8php_html_a4016dad482628807137e0d337ac1cbc4"><div class="ttname"><a href="search-field-date__range_8php.html#a4016dad482628807137e0d337ac1cbc4">$value</a></div><div class="ttdeci">$value</div><div class="ttdef"><b>Definition:</b> <a href="search-field-date__range_8php_source.html#l00010">search-field-date_range.php:10</a></div></div>
<div class="ttc" id="checkbox_8php_html_a73004ce9cd673c1bfafd1dc351134797"><div class="ttname"><a href="checkbox_8php.html#a73004ce9cd673c1bfafd1dc351134797">$output</a></div><div class="ttdeci">$output</div><div class="ttdef"><b>Definition:</b> <a href="checkbox_8php_source.html#l00016">checkbox.php:16</a></div></div>
<div class="ttc" id="radio_8php_html_a1235cd5adeb38c87e768d2f664d27dd5"><div class="ttname"><a href="radio_8php.html#a1235cd5adeb38c87e768d2f664d27dd5">$display_type</a></div><div class="ttdeci">$display_type</div><div class="ttdef"><b>Definition:</b> <a href="radio_8php_source.html#l00013">radio.php:13</a></div></div>
<div class="ttc" id="class_g_v_1_1_utils_html_a744ef7454e48c5521c4c3ad3cf1b700b"><div class="ttname"><a href="class_g_v_1_1_utils.html#a744ef7454e48c5521c4c3ad3cf1b700b">GV\Utils\get</a></div><div class="ttdeci">static get( $array, $key, $default=null)</div><div class="ttdoc">Grab a value from an array or an object or default. </div><div class="ttdef"><b>Definition:</b> <a href="class-gv-utils_8php_source.html#l00072">class-gv-utils.php:72</a></div></div>
<div class="ttc" id="notes_8php_html_aa5233ed44daaa56d417d58cc4d8f64c2"><div class="ttname"><a href="notes_8php.html#aa5233ed44daaa56d417d58cc4d8f64c2">$entry</a></div><div class="ttdeci">$entry</div><div class="ttdef"><b>Definition:</b> <a href="notes_8php_source.html#l00027">notes.php:27</a></div></div>
<div class="ttc" id="time_8php_html_a391bb7936af986b27b996d1a6c2e142c"><div class="ttname"><a href="time_8php.html#a391bb7936af986b27b996d1a6c2e142c">$field_id</a></div><div class="ttdeci">if(false !==strpos( $value, '00:00')) $field_id</div><div class="ttdoc">string $field_id ID of the field being displayed </div><div class="ttdef"><b>Definition:</b> <a href="time_8php_source.html#l00022">time.php:22</a></div></div>
<div class="ttc" id="checkbox_8php_html_abd8615909223c22bd7f77a6919b10ab6"><div class="ttname"><a href="checkbox_8php.html#abd8615909223c22bd7f77a6919b10ab6">$field_value</a></div><div class="ttdeci">$field_value</div><div class="ttdef"><b>Definition:</b> <a href="checkbox_8php_source.html#l00024">checkbox.php:24</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/>
<script type="text/javascript">
jQuery( document ).ready( function( $ ) {
$( 'a.anchor[id^=_filters],a.anchor[id^=_actions]' ).each( function() {
$( this )
.text('#')
.attr( 'href', function() {
return '#' + $( this ).attr( 'id' );
}).prependTo( $( this ).parent('dt' ).next('dd') );
});
});
</script>
</body>
</html>