Welcome Guest, Not a member yet? Register   Sign In
FormIgniter.org launched - Easy form generator - source code now available
#41

[eluser]JonoB[/eluser]
[quote author="eliminator2009" date="1305299034"][quote author="JonoB" date="1305250007"]Exactly as the error message says: look on line 26 of your controller.

Code:
$this->load->view('myform_view', $data);

You are using a variable called $data, but you have not defined it yet.[/quote]

The all above files are auto generated by formigniter.

Where and how do i define $data variable in form.

Thanks.[/quote]
A quick look through your code indicates that it probably is not needed at all, since you are not pre-populating the form with an existing record from your db.

So, try changing that line to
Code:
$this->load->view('myform_view');
#42

[eluser]Ollie Rattue[/eluser]
Hey,

JonoB thanks for explaining the issue to eliminator2009.

I have added this as a issue (bug) on github at https://github.com/ollierattue/FormIgniter/issues/14

Will fix it when I next have some free some open source time.

Thanks,
#43

[eluser]Ollie Rattue[/eluser]
The 'You are using a variable called $data, but you have not defined it yet.' bug has now been fixed.

Bug fix available on https://github.com/ollierattue/FormIgniter/ and the live application at http://formigniter.org
#44

[eluser]4ever[/eluser]
This app looks great. I've just did a quick test. For the people who likes fast solutions...

My notes...

I think that there could be option whether user wants to get output in html or in CI functions (dynamic).

Just one more idea... Maybe it would be hard, but... what if you would press the button ... "See the form" instead "build this form" and with JQuery drag&drop; user could to organize elements into Fieldsets .... And Fieldsets into Divs... Just to get a good look.
#45

[eluser]Ollie Rattue[/eluser]
[quote author="4ever" date="1305853810"]This app looks great. I've just did a quick test. For the people who likes fast solutions... [/quote]

Thanks for your kind words.

[quote author="4ever" date="1305853810"]I think that there could be option whether user wants to get output in html or in CI functions (dynamic).[/quote]

I personally favour html. The CI helpers are great, but tend to confuse frontend developers (who I collaborate with). Still a helper/html option could be added relatively easily.

[quote author="4ever" date="1305853810"]Just one more idea... Maybe it would be hard, but... what if you would press the button ... "See the form" instead "build this form" and with JQuery drag&drop; user could to organize elements into Fieldsets .... And Fieldsets into Divs... Just to get a good look.[/quote]

I think it is quiet a lot of work for little benefit. FormIgniter isn't about producing a pretty form. This would be handled by the developer afterwards using CSS etc.

The source code for FormIgniter is available at https://github.com/ollierattue/formigniter - Give me a shout if you develop either of these two ideas.

Cheers.
#46

[eluser]luke holder[/eluser]
Can you put an option to name the forms/controllers instead of just "myform"

great work by the way.
#47

[eluser]4ever[/eluser]
[quote author="Ollie Rattue" date="1305856973"]

I personally favour html. The CI helpers are great, but tend to confuse frontend developers (who I collaborate with). Still a helper/html option could be added relatively easily.

Cheers.[/quote]

I agree with you that CI helpers and forms solution generaly is still very complicated. But I prefer doing dynamic solutions even it is a little bit slower then clear html. Problem with html start that if you decide later to change some parts of elements then it could be more work then on the dynamic solution.

I already try some symplifing solutions for forms. I thought about adjusting the form_validation to my_form_validation library and validation and form_helper.php to MY_form_helper.php to get simpler solutions... I thought up how to get and use simpler format of configuration array for my_formvalidation. And I think it could be possible to remake or to add methods that could simplify the configuration for both creating form and validation. Having config fields without keys.
#48

[eluser]Ollie Rattue[/eluser]
[quote author="luke holder" date="1305880723"]Can you put an option to name the forms/controllers instead of just "myform"

great work by the way.[/quote]

Thanks - This 'feature' has been requested before and is down for future development - https://github.com/ollierattue/FormIgniter/issues/4
#49

[eluser]felix_[/eluser]
hey,
i just like your app but i hav a question ...
is it a common way to produce an extra controller for each form i hav?
for example when i want a user to register on my page i would have the signup (where the register form should be called), show etc in one controller
so should i c&p the code from your app to my controller or is it common to seperate form from the other stuff?

greetings Smile
#50

[eluser]Ollie Rattue[/eluser]
[quote author="felix_" date="1306076389"]hey,
i just like your app but i hav a question ...
is it a common way to produce an extra controller for each form i hav?
for example when i want a user to register on my page i would have the signup (where the register form should be called), show etc in one controller
so should i c&p the code from your app to my controller or is it common to seperate form from the other stuff?

greetings Smile[/quote]

This is a personal decision on how you like to structure your application. I tend to keep all related functions in the same controller e.g.

Project (controller name)
-> Add
-> Edit
-> Delete
-> Save
-> Publish
-> Preview

[quote author="felix_" date="1306076389"]for example when i want a user to register on my page i would have the signup (where the register form should be called), show etc in one controller
so should i c&p the code from your app to my controller or is it common to seperate form from the other stuff?[/quote]

Yes I copy and paste the outputted code from FormIgniter into my controllers and rename the functions as applicable.




Theme © iAndrew 2016 - Forum software by © MyBB