[eluser]seanloving[/eluser]
[quote author="wiredesignz" date="1256411819"]
Creating forms as partials and being able to load them using your class may be beneficial to others so I submit this PHP5 extension that I am using with Modular Extensions - PHP5, to give you an idea of what is possible with this library. [/quote]
@wiredesignz - thanks, I was wondering how to combine these libraries. I'm trying to get started as you suggest...
1- Is it correct to define
Code:
$this->config['directory'] = 'modules/'
inside the application/config/form.php file? The right value? The right place to define it?
2- Is this a proper looking directory and file structure?
Code:
mysite
application
libraries
Form.php
MX_Form.php
modules
keywords
controllers
keywords.php
models
views
keywords.php (view)
keyword_upload_form.php (view partial)
3 - What's the proper usage? Am I supposed to move the form generation code to the view partial views/keyword_upload_form.php ? or keep it in the controllers/keywords.php ?
Code:
$this->form->open('keyword_upload_form')
->fieldset('Upload Your Keyword List as a .CSV File')
->text('username', 'User Name', 'required|trim|max_length[40]')
->password('password', 'Password', 'required|trim|max_length[40]')
->upload('csv', 'Upload CSV')
->indent(15)
->submit('Upload', 'sub')
->margin(40);
[/code]
4 - Something not working in my initial setup. I'm getting the following warning.
Code:
Message: include(keyword_upload_form.php) [function.include]: failed to open stream: No such file or directory.
Line 26 of libraries/MX_Form.php
Any suggestions where to look?
Thanks
--Sean Loving