Home
Usages
- Details
Generally you will want to setup you form in the controller and call render in the view. Some times for very elaborate forms you may not want to call render of the entire form but just the elements in a certain order.
Basic use:
Here is an example of security question controller:
//Set the table you want to use, the primary key that will be used for updating it
$this->siteForms->setTableName('users');
$this->siteForms->setPKName('id');
$this->siteForms->createElement('id',true,'id',"", "Numeric");
//bind the elements
$this->siteForms->createElement('recovery_q1',true,'',"", "AlphaNumeric");
$this->siteForms->boundElements['recovery_q1']->addValidation('notEmpty',array());
$this->siteForms->createElement('recover_an1_enc',true,'',"", "AlphaNumeric");
$this->siteForms->boundElements['recover_an1_enc']->addValidation('notEmpty',array());
$this->siteForms->createElement('save_btn',false);
//when you first load you will need to set this
$this->siteForms->setTableAction('edit');
//after the form is submitted you'll need to do this
$this->siteForms->setTableAction('update');
//to validate the form do this:
$GoodData = $this->siteForms->bindAndFilter();
//describe their web attributes
$this->siteForms->boundElements['recovery_q1']->form_web_type = "select";
$this->siteForms->boundElements['recovery_q1']->form_label = "Recovery Question 1";
$this->siteForms->boundElements['recovery_q1']->form_cntrl_values = array("what's you pets name?"=>"what's you pets name?","What city were you born in"=>"What city were you born in?");
$this->siteForms->boundElements['recover_an1_enc']->form_web_type = "text";
$this->siteForms->boundElements['recover_an1_enc']->form_label = "Answer to question 1";
$this->siteForms->boundElements['save_btn']->form_web_type = "submit";
$this->siteForms->boundElements['save_btn']->form_label = "";
$this->siteForms->boundElements['save_btn']->form_value = "Save";
//load the data into the form will use the PKName you set and the value you pass to look it up
$this->siteForms->dbLoadSelectTableSingleRow($this->user->user_id); // SQL sees it as id=$this->user->user_id
To render this form in the view controller we call the render function:
echo $this->renderForm();
Hello World
- Details
The best way to start any new language or frame is Hello World.
First the file structure.
What is the app name going to be called. This is not really the fancy name but what your internal app will be called. For example: the main app is called site. For hello world we will call it helloworld.
in you apps folder make a folder called helloworld.
in your new folder you will want to make at the minimal a file called helloworld.php
Slick Date and Time picker
- Details
I need a nice looking and easy to use date and time selector. I didn't want to use a drop down for the time because it just feels kludgy and old. I opted for a clock shape analog with hours. Once you select your hour it changes the hours to 5 minute intervals. The am/pm select is in the middle. The standard JQuery datepicker is used to select the date but in a static way. All this opens in a dialog. Please not this does multiples of 5 for minutes (0, 5, 10, 15, etc.). This opens in a dialog and needs JQuery to work. Another piece of functionality I added was to have the dialog set 2 form elements; 1 textbox with a nice formatted date and 1 hidden with a MySQL date.
For the file go to https://github.com/mrosandich/slickDTP
Quick Example: https://www.ourace.com/code_examples/slickDTP/index.html
So you want to put an above ground pool in Austin?
- Details
So you want to put an above ground pool in Austin?
First thing to remember is that you will need to stay at least 10 feet away from the back fence and 5 feet away from the side fences. This is pretty much true for any type of structure you plan to put in your yard.
Now if you pool is going to less than 5000 gallons there isn’t much else to do with the exceptions of the 10’ x 5’ rule aforementioned. For safety make sure there are no power lines above or below your pool.
Over 5000 gallons you will need a permit which cost me $365.88 at the time I wrote this article (6/12/2015).
Before you go to the planning office you will need a few things.
3 copies of your plot plan with your pool drawn on it to scale use the 1”=20’ scale and make 3 prints on 11x17 papers. This is what is should look like. sample home
Fill out the calcuation_aid.doc which basically will tell the person looking at your plan what type of impact it will have with drainage and impervious cover. calcuation_aid.doc
You will need to fill out the pool deck application as well. pool and deck.pdf
Going to the planning office:
Now march yourself down to the city and go by Austin Energy first, they will need to stamp your plan and they will have a form you will need to fill out and return with your application. They are on the first floor (721 Barton Springs Rd Austin, TX 78704) to the right when you first walk in.
Once you’ve done that take the elevator up to the 2nd floor and go right to the window. They will record you being thee and someone will come out and get you and review the papers to make sure you have everything. If all goes well they will send you to the first floor to pay for it.
Now go home and wait. They will call you and email you. If all goes well then you will be permitted to put in your pool.
Note:
Above ground pools do not affect the impervious cover numbers. So if your pool was 12’x24’ or 288 sq. ft. it would not add 288 sq. ft. to your impervious cover. It has zero affect.
Page 6 of 40