admin@iksi Posted September 10, 2015 Share Posted September 10, 2015 (edited) I'm trying to create a public employee registration page, so far quite unsuccessful.. I have most of the form and database has been updated for the custom fields but i kind-of don't understand what to write to send the data to database. Can someone please help me with: The controller or where-ever else you write the submit? How to get the date of birth field to work - i copied it from original customer registration form How to get a dropdown with currencies? How to get a dropdown with subcategories from a category? Edited September 10, 2015 by admin@iksi (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted September 16, 2015 Share Posted September 16, 2015 My suggestion is having a look at the contact controller. The postProcess method usually fires on submit, so target that one. Inside, first thing I'd do would be to dump all post variables and see what is being sent through. Then, create a new employuee object$employee = new Employee();And assign all needed data (that is, what you have)Lastly, save.$employee->add();Currencies: Currency::getCurrencies();Category: COuld you make an example? Link to comment Share on other sites More sharing options...
admin@iksi Posted October 25, 2015 Author Share Posted October 25, 2015 My suggestion is having a look at the contact controller. The postProcess method usually fires on submit, so target that one. Inside, first thing I'd do would be to dump all post variables and see what is being sent through. Then, create a new employuee object $employee = new Employee(); And assign all needed data (that is, what you have) Lastly, save. $employee->add(); Currencies: Currency::getCurrencies(); Category: COuld you make an example? example would be cities of countries, as a tourism site they added all countries that they considered countries (some that officially aren't) and their cities it probably will help me edit layered navigation too... as it doesn't show subcategories under categories but everything in one big mess Link to comment Share on other sites More sharing options...
NemoPS Posted October 26, 2015 Share Posted October 26, 2015 So you mean displaying a dropdown instead of the subcategories list, in the category view? Link to comment Share on other sites More sharing options...
admin@iksi Posted October 31, 2015 Author Share Posted October 31, 2015 So you mean displaying a dropdown instead of the subcategories list, in the category view? dropdown of subcategories depending on which category is selected Link to comment Share on other sites More sharing options...
NemoPS Posted October 31, 2015 Share Posted October 31, 2015 It should be enough to modify the subcategories part. Inside category.tpl, locate{if isset($subcategories)}It should contain plenty of things. Replace everything with a select box, and use{foreach from=$subcategories item=subcategory}To create the options. You will need an onchange event to fire the page redirection of course Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now