Re: Passing parametre

Muzaffer Tolga Ozses <[email protected]> Thu, 5 Dec 2013 08:57:11 +0200
Newsgroups gmane.comp.php.drupal.devel
Message-ID <CAMAQ3nJdg5w7fe9SisPBZ4uWpsvPWaY4YOKVz9k7qFmo1tBvww@mail.gmail.com>
--f46d043bdfa2f3377104ecc409e1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Oh, and thanks :)

mto


On 5 December 2013 08:56, Muzaffer Tolga Ozses <[email protected]> wrote:

> You were right, I did. It's just that I have been told 'button' and
> 'submit' both could submit forms.
>
>
> On 5 December 2013 01:21, Murat G=FCnana <[email protected]> wrote:
>
>> You need to change submit type from "button" to "submit". For some reaso=
n
>> it's not getting triggered.
>>
>> See discussion https://drupal.org/node/72855.
>>
>> The working one for you should be like
>>
>> $form['actions']['submit'] =3D array(
>>     '#type' =3D> 'submit',
>>
>>     '#value' =3D> t('Submit'),
>>     '#submit' =3D> array('night_pharmacy_form_submit'),
>>   );
>>
>>
>>
>>
>> On 4 December 2013 22:48, Muzaffer Tolga Ozses <[email protected]> wrote:
>>
>>> Unbelievable, night_pharmacy_form_submit doesn't even get hit :S . See
>>> http://git.webciniz.im/?p=3Dproject/night_pharmacy.git;a=3Dblob;f=3Dnig=
ht_pharmacy.module;h=3Db0fecaef686cc458f946e4ab69bbfd81d5f8be25;hb=3Drefs/h=
eads/2013120501#l57please
>>>
>>>
>>> On 4 December 2013 16:55, Paolo Mainardi <[email protected]> wrote:
>>>
>>>> Hi Muzaffer,
>>>>
>>>> You should consider to refactor using drupal coding standard, example
>>>> from comment module:
>>>>
>>>>   $form['actions'] =3D array('#type' =3D> 'actions');
>>>>    $form['actions']['submit'] =3D array(
>>>>     '#type' =3D> 'submit',
>>>>     '#value' =3D> t('Save'),
>>>>     '#access' =3D> ($comment->cid && user_access('administer comments'=
))
>>>> || variable_get('comment_preview_' . $node->type, DRUPAL_OPTIONAL) !=
=3D
>>>> DRUPAL_REQUIRED || isset($form_state['comment_preview']),
>>>>     '#weight' =3D> 19,
>>>>   );
>>>>   $form['actions']['preview'] =3D array(
>>>>     '#type' =3D> 'submit',
>>>>     '#value' =3D> t('Preview'),
>>>>     '#access' =3D> (variable_get('comment_preview_' . $node->type,
>>>> DRUPAL_OPTIONAL) !=3D DRUPAL_DISABLED),
>>>>     '#weight' =3D> 20,
>>>>     '#submit' =3D> array('comment_form_build_preview'),
>>>>   );
>>>>
>>>>
>>>> https://api.drupal.org/api/drupal/developer!topics!forms_api_reference=
.html/7#actions
>>>>
>>>> Why you need to call a specific submit function, as you'll have for
>>>> free "night_pharmacy_form_submit($form, &$form_state)" already execute=
d by
>>>> Drupal ?
>>>>
>>>>
>>>>
>>>>
>>>> On Wed, Dec 4, 2013 at 3:46 PM, Muzaffer Tolga Ozses <[email protected]>=
wrote:
>>>>
>>>>> So, what else can I check?
>>>>>
>>>>>
>>>>> On 4 December 2013 15:24, Murat G=FCnana <[email protected]> wrote:
>>>>>
>>>>>> According to the form api it should be able to do that.
>>>>>>
>>>>>>
>>>>>> On 4 December 2013 13:17, John Morahan <[email protected]>wrote=
:
>>>>>>
>>>>>>> '#type' =3D> 'button' won't execute a submit callback, try '#type' =
=3D>
>>>>>>> 'submit'
>>>>>>>
>>>>>>>
>>>>>>> On 4 December 2013 13:16, Murat G=FCnana <[email protected]> wrote:
>>>>>>>
>>>>>>>> You shouldn't return anything in the callback function. you need t=
o
>>>>>>>> remove "return $source" line from there.
>>>>>>>> Just for test purposes put this line in callback function and see
>>>>>>>> if you can get any form error form_set_error('iller_select',
>>>>>>>> 'Error.');
>>>>>>>>
>>>>>>>>
>>>>>>>> On 4 December 2013 12:59, Muzaffer Tolga Ozses <[email protected]>wr=
ote:
>>>>>>>>
>>>>>>>>> Look at
>>>>>>>>> http://git.webciniz.im/?p=3Dproject/night_pharmacy.git;a=3Dblob;f=
=3Dnight_pharmacy.module;h=3D49adff05adea3549c4566c2cb2ec2ce2f6d5db08;hb=3D=
16ee60869975ca8794abc193e0713376945c0c02#l54. I made the changes you sugges=
ted and no dice :S
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 4 December 2013 14:54, Murat G=FCnana <[email protected]> wrot=
e:
>>>>>>>>>
>>>>>>>>>> implement your form submit element like;
>>>>>>>>>> $form['actions']['submit'] =3D array(
>>>>>>>>>>      '#type' =3D> 'button',
>>>>>>>>>>      '#value' =3D> t('Submit'),
>>>>>>>>>>      '#submit' =3D> array('night_pharmacy_table'),
>>>>>>>>>>    );
>>>>>>>>>> and make sure you clear the cache.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 4 December 2013 12:49, Muzaffer Tolga Ozses <[email protected]>=
wrote:
>>>>>>>>>>
>>>>>>>>>>> Thanks Patrick,
>>>>>>>>>>>
>>>>>>>>>>> Unfortunately, night_pharmacy_table never gets called, and I
>>>>>>>>>>> have no clue why. Do you happen to have an idea?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 4 December 2013 14:35, Patrick Dawkins <[email protected]=
>wrote:
>>>>>>>>>>>
>>>>>>>>>>>> night_pharmacy_table is a form submit callback. It already get=
s
>>>>>>>>>>>> passed the $form parameter; you have got the function signatur=
e wrong.
>>>>>>>>>>>>
>>>>>>>>>>>> So you need to change
>>>>>>>>>>>> function night_pharmacy_table($form_state) {
>>>>>>>>>>>> to
>>>>>>>>>>>> function night_pharmacy_table($form, &$form_state) {
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Documentation here:
>>>>>>>>>>>> https://api.drupal.org/api/drupal/developer!topics!forms_api_r=
eference.html/7#submit_property
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 4 December 2013 12:14, Muzaffer Tolga Ozses <[email protected]=
t
>>>>>>>>>>>> > wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> This is really a PHP question, but it involves $form_state, s=
o
>>>>>>>>>>>>> bear with me please.
>>>>>>>>>>>>>
>>>>>>>>>>>>> In my code at
>>>>>>>>>>>>> http://git.webciniz.im/?p=3Dproject/night_pharmacy.git;a=3Dbl=
ob;f=3Dnight_pharmacy.module;h=3D132b5d4a90692acfadfe9e11af128f712df1c24d;h=
b=3De89e63bb07f064898ca21be1c97aba221b4dbdaf#l57I want to be able to pass $=
form parameters to night_pharmacy_table, to no
>>>>>>>>>>>>> avail. Can you help me guys?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks in advance :)
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Kind regards,
>>>>>>>>>>
>>>>>>>>>> Murat Gunana
>>>>>>>>>> Tel: 07927964976
>>>>>>>>>> Email: [email protected]
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Kind regards,
>>>>>>>>
>>>>>>>> Murat Gunana
>>>>>>>> Tel: 07927964976
>>>>>>>> Email: [email protected]
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Kind regards,
>>>>>>
>>>>>> Murat Gunana
>>>>>> Tel: 07927964976
>>>>>> Email: [email protected]
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> [image: TWINBIT logo] <http://twinbit.it/>
>>>>
>>>> Paolo Mainardi
>>>>
>>>> *Twinbit Founder - CTO *
>>>> *www*:      twinbit.it
>>>> *mobile*:   (+39) 3401678089
>>>> *skype*:    paolo_mainardi
>>>> *linkedin*: paolomainardi <http://www.linkedin.com/in/paolomainardi>
>>>> *twitter*:  @paolomainardi <http://twitter.com/paolomainardi>
>>>> *blog*:     paolomainardi.com
>>>>
>>>
>>>
>>
>>
>> --
>> Kind regards,
>>
>> Murat Gunana
>> Tel: 07927964976
>> Email: [email protected]
>>
>
>

--f46d043bdfa2f3377104ecc409e1
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:courier =
new,monospace">Oh, and thanks :)</div><div class=3D"gmail_default" style=3D=
"font-family:courier new,monospace"><br></div><div class=3D"gmail_default" =
style=3D"font-family:courier new,monospace">
mto</div></div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote=
">On 5 December 2013 08:56, Muzaffer Tolga Ozses <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</s=
pan> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default=
" style=3D"font-family:courier new,monospace">You were right, I did. It&#39=
;s just that I have been told &#39;button&#39; and &#39;submit&#39; both co=
uld submit forms.</div>
</div><div class=3D"HOEnZb"><div class=3D"h5"><div class=3D"gmail_extra">
<br><br><div class=3D"gmail_quote">On 5 December 2013 01:21, Murat G=FCnana=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blan=
k">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
">

<div dir=3D"ltr"><div><div>You need to change submit type from &quot;button=
&quot; to &quot;submit&quot;. For some reason it&#39;s not getting triggere=
d.<br><br></div>See discussion <a href=3D"https://drupal.org/node/72855" ta=
rget=3D"_blank">https://drupal.org/node/72855</a>.<br>


<br></div>The working one for you should be like<div><br>$form[&#39;actions=
&#39;][&#39;submit&#39;] =3D array(<br></div>=A0=A0=A0 &#39;#type&#39; =3D&=
gt; &#39;submit&#39;,<div><br>=A0=A0=A0 &#39;#value&#39; =3D&gt; t(&#39;Sub=
mit&#39;),<br>

</div>=A0=A0=A0 &#39;#submit&#39; =3D&gt; array(&#39;night_pharmacy_form_su=
bmit&#39;),<br>
=A0 );<br><br><br></div><div><div><div class=3D"gmail_extra"><br><br><div c=
lass=3D"gmail_quote">On 4 December 2013 22:48, Muzaffer Tolga Ozses <span d=
ir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">tolga@o=
zses.net</a>&gt;</span> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default=
" style=3D"font-family:&#39;courier new&#39;,monospace">Unbelievable, night=
_pharmacy_form_submit doesn&#39;t even get hit :S . See=A0<a href=3D"http:/=
/git.webciniz.im/?p=3Dproject/night_pharmacy.git;a=3Dblob;f=3Dnight_pharmac=
y.module;h=3Db0fecaef686cc458f946e4ab69bbfd81d5f8be25;hb=3Drefs/heads/20131=
20501#l57" target=3D"_blank">http://git.webciniz.im/?p=3Dproject/night_phar=
macy.git;a=3Dblob;f=3Dnight_pharmacy.module;h=3Db0fecaef686cc458f946e4ab69b=
bfd81d5f8be25;hb=3Drefs/heads/2013120501#l57</a> please</div>



</div><div><div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quot=
e">On 4 December 2013 16:55, Paolo Mainardi <span dir=3D"ltr">&lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&gt;</sp=
an> wrote:<br>


<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">
<div dir=3D"ltr">Hi Muzaffer,<div><br></div><div>You should consider to ref=
actor using drupal coding standard, example from comment module:</div><div>=
<br></div><div><div>=A0 $form[&#39;actions&#39;] =3D array(&#39;#type&#39; =
=3D&gt; &#39;actions&#39;);</div>



<div>

<div>=A0 $form[&#39;actions&#39;][&#39;submit&#39;] =3D array(</div></div><=
div>=A0 =A0 &#39;#type&#39; =3D&gt; &#39;submit&#39;,</div><div>=A0 =A0 &#3=
9;#value&#39; =3D&gt; t(&#39;Save&#39;),</div><div>=A0 =A0 &#39;#access&#39=
; =3D&gt; ($comment-&gt;cid &amp;&amp; user_access(&#39;administer comments=
&#39;)) || variable_get(&#39;comment_preview_&#39; . $node-&gt;type, DRUPAL=
_OPTIONAL) !=3D DRUPAL_REQUIRED || isset($form_state[&#39;comment_preview&#=
39;]),</div>





<div>=A0 =A0 &#39;#weight&#39; =3D&gt; 19,</div><div>=A0 );</div><div>=A0 $=
form[&#39;actions&#39;][&#39;preview&#39;] =3D array(</div><div>=A0 =A0 &#3=
9;#type&#39; =3D&gt; &#39;submit&#39;,</div><div>=A0 =A0 &#39;#value&#39; =
=3D&gt; t(&#39;Preview&#39;),</div>





<div>=A0 =A0 &#39;#access&#39; =3D&gt; (variable_get(&#39;comment_preview_&=
#39; . $node-&gt;type, DRUPAL_OPTIONAL) !=3D DRUPAL_DISABLED),</div><div>=
=A0 =A0 &#39;#weight&#39; =3D&gt; 20,</div><div>=A0 =A0 &#39;#submit&#39; =
=3D&gt; array(&#39;comment_form_build_preview&#39;),</div>





<div>=A0 );</div></div><div><br></div><div><a href=3D"https://api.drupal.or=
g/api/drupal/developer!topics!forms_api_reference.html/7#actions" target=3D=
"_blank">https://api.drupal.org/api/drupal/developer!topics!forms_api_refer=
ence.html/7#actions</a><br>





</div><div><br></div><div>Why you need to call a specific submit function, =
as you&#39;ll have for free &quot;night_pharmacy_form_submit($form, &amp;$f=
orm_state)&quot; already executed by Drupal ?</div><div><br></div><div>





<br></div></div><div class=3D"gmail_extra"><div><div><br><br><div class=3D"=
gmail_quote">On Wed, Dec 4, 2013 at 3:46 PM, Muzaffer Tolga Ozses <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">tolga@ozs=
es.net</a>&gt;</span> wrote:<br>





<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default=
" style=3D"font-family:courier new,monospace">So, what else can I check?</d=
iv></div>





<div><div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On =
4 December 2013 15:24, Murat G=FCnana <span dir=3D"ltr">&lt;<a href=3D"mail=
to:[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wr=
ote:<br>






<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr">According to the form api i=
t should be able to do that.<br></div><div><div><div class=3D"gmail_extra">
<br><br><div class=3D"gmail_quote">On 4 December 2013 13:17, John Morahan <=
span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_b=
lank">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr">&#39;#type&#39; =3D&gt; &#3=
9;button&#39; won&#39;t execute a submit callback, try &#39;#type&#39; =3D&=
gt; &#39;submit&#39;</div>







<div><div><div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On =
4 December 2013 13:16, Murat G=FCnana <span dir=3D"ltr">&lt;<a href=3D"mail=
to:[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wr=
ote:<br>









<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>You shouldn&#39;t retu=
rn anything in the callback function. you need to remove &quot;return $sour=
ce&quot; line from there.<br>









</div>Just for test purposes put this line in callback function and see if =
you can get any form error <span style=3D"margin:0px;padding:0px;border:0px=
 none;font-family:&#39;Bitstream Vera Sans Mono&#39;,Monaco,&#39;Lucida Con=
sole&#39;,monospace;font-style:normal;font-variant:normal;font-weight:norma=
l;line-height:17.9844px;font-size:12px;vertical-align:baseline;letter-spaci=
ng:normal;text-align:start;text-indent:0px;text-transform:none;white-space:=
pre-wrap;word-spacing:0px;background-color:rgb(246,246,242);color:rgb(0,0,1=
87)">form_set_error</span><span style=3D"margin:0px;padding:0px;border:0px =
none;font-family:&#39;Bitstream Vera Sans Mono&#39;,Monaco,&#39;Lucida Cons=
ole&#39;,monospace;font-style:normal;font-variant:normal;font-weight:normal=
;line-height:17.9844px;font-size:12px;vertical-align:baseline;letter-spacin=
g:normal;text-align:start;text-indent:0px;text-transform:none;white-space:p=
re-wrap;word-spacing:0px;background-color:rgb(246,246,242);color:rgb(0,119,=
0)">(</span><span style=3D"margin:0px;padding:0px;border:0px none;font-fami=
ly:&#39;Bitstream Vera Sans Mono&#39;,Monaco,&#39;Lucida Console&#39;,monos=
pace;font-style:normal;font-variant:normal;font-weight:normal;line-height:1=
7.9844px;font-size:12px;vertical-align:baseline;letter-spacing:normal;text-=
align:start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-s=
pacing:0px;background-color:rgb(246,246,242);color:rgb(221,0,0)">&#39;iller=
_select&#39;</span><span style=3D"margin:0px;padding:0px;border:0px none;fo=
nt-family:&#39;Bitstream Vera Sans Mono&#39;,Monaco,&#39;Lucida Console&#39=
;,monospace;font-style:normal;font-variant:normal;font-weight:normal;line-h=
eight:17.9844px;font-size:12px;vertical-align:baseline;letter-spacing:norma=
l;text-align:start;text-indent:0px;text-transform:none;white-space:pre-wrap=
;word-spacing:0px;background-color:rgb(246,246,242);color:rgb(0,119,0)">, <=
/span><span style=3D"margin:0px;padding:0px;border:0px none;font-family:&#3=
9;Bitstream Vera Sans Mono&#39;,Monaco,&#39;Lucida Console&#39;,monospace;f=
ont-style:normal;font-variant:normal;font-weight:normal;line-height:17.9844=
px;font-size:12px;vertical-align:baseline;letter-spacing:normal;text-align:=
start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacing=
:0px;background-color:rgb(246,246,242);color:rgb(221,0,0)">&#39;Error.&#39;=
</span><span style=3D"margin:0px;padding:0px;border:0px none;font-family:&#=
39;Bitstream Vera Sans Mono&#39;,Monaco,&#39;Lucida Console&#39;,monospace;=
font-style:normal;font-variant:normal;font-weight:normal;line-height:17.984=
4px;font-size:12px;vertical-align:baseline;letter-spacing:normal;text-align=
:start;text-indent:0px;text-transform:none;white-space:pre-wrap;word-spacin=
g:0px;background-color:rgb(246,246,242);color:rgb(0,119,0)">);</span></div>









<div><div>
<div class=3D"gmail_extra"><br><br><div class=3D"gmail_quote">On 4 December=
 2013 12:59, Muzaffer Tolga Ozses <span dir=3D"ltr">&lt;<a href=3D"mailto:t=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>=
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex">










<div dir=3D"ltr"><div class=3D"gmail_default"><font face=3D"courier new, mo=
nospace">Look at <a href=3D"http://git.webciniz.im/?p=3Dproject/night_pharm=
acy.git;a=3Dblob;f=3Dnight_pharmacy.module;h=3D49adff05adea3549c4566c2cb2ec=
2ce2f6d5db08;hb=3D16ee60869975ca8794abc193e0713376945c0c02#l54" target=3D"_=
blank">http://git.webciniz.im/?p=3Dproject/night_pharmacy.git;a=3Dblob;f=3D=
night_pharmacy.module;h=3D49adff05adea3549c4566c2cb2ec2ce2f6d5db08;hb=3D16e=
e60869975ca8794abc193e0713376945c0c02#l54</a> . I made the changes you sugg=
ested and no dice :S</font><br>











</div></div><div><div><div class=3D"gmail_extra"><br><br><div class=3D"gmai=
l_quote">On 4 December 2013 14:54, Murat G=FCnana <span dir=3D"ltr">&lt;<a =
href=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t;</span> wrote:<br>











<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div>implement your form su=
bmit element like;<br>$form[&#39;actions&#39;][&#39;submit&#39;] =3D array(=
<br>











=A0=A0=A0=A0 &#39;#type&#39; =3D&gt; &#39;button&#39;,<br>=A0=A0=A0=A0 &#39=
;#value&#39; =3D&gt; t(&#39;Submit&#39;),<br>=A0=A0=A0=A0 &#39;#submit&#39;=
 =3D&gt; array(&#39;night_pharmacy_table&#39;),<br>
=A0=A0 );<br></div>and make sure you clear the cache.<br></div><div class=
=3D"gmail_extra"><div><div><br><br><div class=3D"gmail_quote">On 4 December=
 2013 12:49, Muzaffer Tolga Ozses <span dir=3D"ltr">&lt;<a href=3D"mailto:t=
[email protected]" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>












<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default=
" style=3D"font-family:courier new,monospace">Thanks Patrick,</div><div cla=
ss=3D"gmail_default" style=3D"font-family:courier new,monospace">












<br></div><div class=3D"gmail_default" style=3D"font-family:courier new,mon=
ospace">

Unfortunately, night_pharmacy_table never gets called, and I have no clue w=
hy. Do you happen to have an idea?</div><div><div><div class=3D"gmail_extra=
"><br><br><div class=3D"gmail_quote">On 4 December 2013 14:35, Patrick Dawk=
ins <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D=
"_blank">[email protected]</a>&gt;</span> wrote:<br>














<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr">night_pharmacy_table is a f=
orm submit callback. It already gets passed the $form parameter; you have g=
ot the function signature wrong.<div>














<br></div><div><div>So you need to change<div><div>function night_pharmacy_=
table($form_state) {</div>

<div>to</div><div>function night_pharmacy_table($form, &amp;$form_state) {<=
/div></div></div><div><br></div><div><br></div><div>Documentation here:=A0<=
a href=3D"https://api.drupal.org/api/drupal/developer!topics!forms_api_refe=
rence.html/7#submit_property" target=3D"_blank">https://api.drupal.org/api/=
drupal/developer!topics!forms_api_reference.html/7#submit_property</a><div>
















<br></div></div><div><br></div></div></div><div><div><div class=3D"gmail_ex=
tra"><br><br><div class=3D"gmail_quote">On 4 December 2013 12:14, Muzaffer =
Tolga Ozses <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;</span> wrote:<br>
















<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default=
" style=3D"font-family:&#39;courier new&#39;,monospace">Hi,</div><div class=
=3D"gmail_default" style=3D"font-family:&#39;courier new&#39;,monospace">
















<br></div><div class=3D"gmail_default" style=3D"font-family:&#39;courier ne=
w&#39;,monospace">
This is really a PHP question, but it involves $form_state, so bear with me=
 please.</div><div class=3D"gmail_default" style=3D"font-family:&#39;courie=
r new&#39;,monospace"><br></div><div class=3D"gmail_default" style=3D"font-=
family:&#39;courier new&#39;,monospace">

















In my code at=A0<a href=3D"http://git.webciniz.im/?p=3Dproject/night_pharma=
cy.git;a=3Dblob;f=3Dnight_pharmacy.module;h=3D132b5d4a90692acfadfe9e11af128=
f712df1c24d;hb=3De89e63bb07f064898ca21be1c97aba221b4dbdaf#l57" target=3D"_b=
lank">http://git.webciniz.im/?p=3Dproject/night_pharmacy.git;a=3Dblob;f=3Dn=
ight_pharmacy.module;h=3D132b5d4a90692acfadfe9e11af128f712df1c24d;hb=3De89e=
63bb07f064898ca21be1c97aba221b4dbdaf#l57</a> I want to be able to pass $for=
m parameters to night_pharmacy_table, to no avail. Can you help me guys?</d=
iv>

















<div class=3D"gmail_default" style=3D"font-family:&#39;courier new&#39;,mon=
ospace"><br></div><div class=3D"gmail_default" style=3D"font-family:&#39;co=
urier new&#39;,monospace">Thanks in advance :)</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br><br clear=3D"all"><br></div></div><div>-- <br>Kind r=
egards,<br><br>Murat Gunana<br>Tel: <a href=3D"tel:07927964976" value=3D"+3=
907927964976" target=3D"_blank">07927964976</a><br>Email: <a href=3D"mailto=
:[email protected]" target=3D"_blank">[email protected]</a><br>






</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Kind regard=
s,<br><br>Murat Gunana<br>Tel: <a href=3D"tel:07927964976" value=3D"+390792=
7964976" target=3D"_blank">07927964976</a><br>Email: <a href=3D"mailto:mgun=
[email protected]" target=3D"_blank">[email protected]</a><br>






</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Kind regard=
s,<br><br>Murat Gunana<br>Tel: <a href=3D"tel:07927964976" value=3D"+390792=
7964976" target=3D"_blank">07927964976</a><br>Email: <a href=3D"mailto:mgun=
[email protected]" target=3D"_blank">[email protected]</a><br>






</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear=3D"all"><div><br></div></div><=
/div><span><font color=3D"#888888">-- <br><div><a href=3D"http://twinbit.it=
/" style=3D"color:rgb(17,85,204);font-family:Consolas,Menlo,Monaco,&#39;And=
ale Mono WT&#39;,&#39;Andale Mono&#39;,&#39;Lucida Console&#39;,&#39;Lucida=
 Sans Typewriter&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans M=
ono&#39;,&#39;Liberation Mono&#39;,&#39;Nimbus Mono L&#39;,&#39;Courier New=
&#39;,Courier,monospace;font-size:x-small" target=3D"_blank"><img alt=3D"TW=
INBIT logo" border=3D"0" height=3D"46" width=3D"200"></a><span style=3D"fon=
t-family:Consolas,Menlo,Monaco,&#39;Andale Mono WT&#39;,&#39;Andale Mono&#3=
9;,&#39;Lucida Console&#39;,&#39;Lucida Sans Typewriter&#39;,&#39;DejaVu Sa=
ns Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Liberation Mono&#39;,&=
#39;Nimbus Mono L&#39;,&#39;Courier New&#39;,Courier,monospace;font-size:x-=
small">=A0</span><br style=3D"font-family:Consolas,Menlo,Monaco,&#39;Andale=
 Mono WT&#39;,&#39;Andale Mono&#39;,&#39;Lucida Console&#39;,&#39;Lucida Sa=
ns Typewriter&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono=
&#39;,&#39;Liberation Mono&#39;,&#39;Nimbus Mono L&#39;,&#39;Courier New&#3=
9;,Courier,monospace;font-size:x-small">





<br style=3D"font-family:Consolas,Menlo,Monaco,&#39;Andale Mono WT&#39;,&#3=
9;Andale Mono&#39;,&#39;Lucida Console&#39;,&#39;Lucida Sans Typewriter&#39=
;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Libera=
tion Mono&#39;,&#39;Nimbus Mono L&#39;,&#39;Courier New&#39;,Courier,monosp=
ace;font-size:x-small">





<font style=3D"font-family:arial,helvetica,sans-serif;color:rgb(51,51,51)">=
<font size=3D"4">Paolo Mainardi</font>=A0<br></font><i>Twinbit Founder - CT=
O<br style=3D"font-family:Consolas,Menlo,Monaco,&#39;Andale Mono WT&#39;,&#=
39;Andale Mono&#39;,&#39;Lucida Console&#39;,&#39;Lucida Sans Typewriter&#3=
9;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Liber=
ation Mono&#39;,&#39;Nimbus Mono L&#39;,&#39;Courier New&#39;,Courier,monos=
pace;font-size:x-small">





</i><br style=3D"font-family:Consolas,Menlo,Monaco,&#39;Andale Mono WT&#39;=
,&#39;Andale Mono&#39;,&#39;Lucida Console&#39;,&#39;Lucida Sans Typewriter=
&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Li=
beration Mono&#39;,&#39;Nimbus Mono L&#39;,&#39;Courier New&#39;,Courier,mo=
nospace;font-size:x-small">





<font style=3D"font-family:Consolas,Menlo,Monaco,&#39;Andale Mono WT&#39;,&=
#39;Andale Mono&#39;,&#39;Lucida Console&#39;,&#39;Lucida Sans Typewriter&#=
39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Libe=
ration Mono&#39;,&#39;Nimbus Mono L&#39;,&#39;Courier New&#39;,Courier,mono=
space" color=3D"#666666" face=3D"Consolas, Menlo, Monaco, Courier New, Cour=
ier, monospace"><font face=3D"Consolas, Menlo, Monaco, Courier New, Courier=
, monospace"><b>www</b>:=A0=A0=A0=A0=A0=A0<a href=3D"http://twinbit.it/" st=
yle=3D"color:rgb(241,126,14)" target=3D"_blank">twinbit.it</a></font>=A0<br=
>





<font face=3D"Consolas, Menlo, Monaco, Courier New, Courier, monospace"><b>=
mobile</b>:=A0=A0=A0<a value=3D"+393895122611" style=3D"color:rgb(17,85,204=
)">(+39) 3401678089</a></font>=A0<br><font face=3D"Consolas, Menlo, Monaco,=
 Courier New, Courier, monospace"><b>skype</b>: =A0 =A0paolo_mainardi</font=
>=A0<br>





<font face=3D"Consolas, Menlo, Monaco, Courier New, Courier, monospace"><b>=
linkedin</b>:=A0<a href=3D"http://www.linkedin.com/in/paolomainardi" style=
=3D"color:rgb(241,126,14)" target=3D"_blank">paolomainardi</a></font>=A0<br=
><font face=3D"Consolas, Menlo, Monaco, Courier New, Courier, monospace"><b=
>twitter</b>:=A0=A0<a href=3D"http://twitter.com/paolomainardi" style=3D"co=
lor:rgb(241,126,14)" target=3D"_blank">@paolomainardi</a></font>=A0<br>





<font face=3D"Consolas, Menlo, Monaco, Courier New, Courier, monospace"><b>=
blog</b>:=A0=A0=A0=A0=A0<a href=3D"http://paolomainardi.com/" style=3D"colo=
r:rgb(241,126,14)" target=3D"_blank">paolomainardi.com</a></font>=A0<br></f=
ont></div>
</font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear=3D"all"><br>-- <br>Kind regard=
s,<br><br>Murat Gunana<br>Tel: 07927964976<br>Email: <a href=3D"mailto:mgun=
[email protected]" target=3D"_blank">[email protected]</a><br>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>

--f46d043bdfa2f3377104ecc409e1--