Advertisement
Guest User

HTMLcreator

a guest
Jan 26th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.38 KB | None | 0 0
  1. /*
  2.  * create new Form
  3.  */
  4. $form = FormWidget::create(
  5.         /*
  6.          * options (you can add more after)
  7.          */
  8.         array(
  9. 'direction' => HTML_RIGHT_TO_LEFT,
  10. 'id' => 'myform',
  11. 'HTTP-method' => HTTP_POST),
  12.         /*
  13.          * content (you can add more after)
  14.          */
  15. array(
  16.     /*
  17.      * add new list box
  18.      */
  19.     listBoxWidget::create(array(
  20.         /*
  21.          * list box options
  22.          */
  23. 'widject-id' => 'drink',
  24. 'rows' => 4,
  25. 'label' => 'choose your favorite drink',
  26. 'align' => 'center'),
  27. array(
  28.     /*
  29.      * list box content
  30.      */
  31.     /*
  32.      * new listoption
  33.      */
  34. Listoption::create(
  35.         /*
  36.          * options
  37.          */
  38.         array(
  39. 'value' => 'water'),
  40.         /*
  41.          * content
  42.          */
  43. 'water',
  44.         /*
  45.          * style
  46.          */
  47.         array(
  48. 'font-weight' => 'bold',
  49. 'color' => 'blue')
  50.     )
  51.     /*
  52.      * more list option
  53.      */
  54.     Listoption::create(
  55.             /*
  56.              * options
  57.              */
  58.             array(
  59. 'value' => 'milk'),
  60.             /*
  61.              * content
  62.              */
  63.         'milk',
  64.             /*
  65.              * style
  66.              */
  67.             array(
  68. 'font-weight' => 'bold',
  69. 'color' => 'blue'
  70.             ))
  71.     )
  72.     )
  73.             ),
  74.         FormToken::create(md5('dsadsadsartrrrr'.md5(time().'fwe;lk')))
  75.     ));
  76. echo $form->toString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement