[pmwiki-users] question on markup & forms
Marco Ferretti
marco.ferretti at gmail.com
Wed May 3 09:24:41 CDT 2006
Hi all,
I am studying forms & markup. Since they always told me that the best way to
learn something is using it, I was trying to modify the newpageboxplus.php
coming along with BlogSimple cookbook.
Actually, what I am trying to achieve is to separate the date ( thus creating
another text field ) from the pagename.
So what I did was :
1 - added datelbl to the array of defaults :
$defaults = array(
'base' => '',
'template' => '',
'value' => '',
'size' => '30',
'datelbl' => '',
'label' => FmtPageName(' $[Create a new page called:] ', $pagename),
'button' => 'left',
'focus' => '',
'save' => '');
2 - added the text box to the html :
($opt['button']=="left" ? $buttonHTML : "") .
"<input class='inputbox newpagetext' type='text' name='date'
value='{$opt['datelbl']}' size='{$opt['size']}'" .
then I've called the markup from a wiki page :
(:newpagebox base="EventPages.HomePage" template=Event.EventTemplate
button=right label="New Event Entry" size=40 datelbl="2006-05-03- "
value='' :)
expecting to see at least an error of some sort ...
What I got is that the markup call shows in the page actually painting
(:newpagebox base="EventPages.HomePage" template=Event.EventTemplate
button=right label="New Event Entry" size=40 datelbl="2006-05-03- "
value='' :)
Now I'm a bit puzzled since if I restore the old php file and remove the
datelbl thing from the markup it works ( meaning that it draws a text box ) .
At the point where I am now, I am not worring about passing the right
parameter to the right variable ... i just wish I could understand why it is
not working.
TIA
Marco
--
Tomorrow, this will be part of the unchangeable past but fortunately,
it can still be changed today.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/pmwiki-users/attachments/20060503/e1233f2d/attachment.bin
More information about the pmwiki-users
mailing list