This is my first time using EE or CI. I need to create a multi-page form to allow users to configure and purchase a service from our company. My initial research indicated that there isn’t anything ready-made to do such a thing so I realized I needed to build my own. Which is fine as I like having that level of control. The downside is I have a learning curve to deal with along with a deadline. 😊
So, I decided to create a plugin (a module seemed overkill since this was single use). Since this is a multi-page form I wanted to use a session to store data between pages. However as I started to code this up I found a potential problem.
It appears that I cannot use the set_userdata method of the CI Session class. When I try I get this error.
Fatal error: Call to undefined method EE_Session::set_userdata()This was my code:
$this->CI->session->set_userdata('vl_form_data', $form_data);What I notice in the error is that EE seems to actually be handling the sessions. Second, EE’s Session class must not have the “set_userdata” method.
Am I doing something wrong? What are my options? Any pointers on multi-page forms in a plugin with CI and EE?
Try using “EE” instead of “CI”.
elvicmic, Thank you. I have not tried what you suggest, because I am on a deadline and have decided to move ahead with using the standard PHP session and it is working well.
However, I did look into the EE Session Class and I do not see the set_userdata() method nor is it in the documentation, so I am assuming now that using EE would not help. Maybe in the future I can get back to checking this out.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.