I am new to OrangeHRM 3.3.2 I need to add new field in the Personal Details. I need your help. Thanx
You can add fields to your OrangeHRM application by doing one of these.
1) Edit the database to contain your new field. Then edit the application form template using a new ohrm_widget (ohrm widget means an input field in the OrangeHRM system (ex. Test Field, Calendar, Dropdown, etc.)) and edit the controller function to pass your data to the backend. Then complete the DAO layer function to save your data at the database.
Ex:
If you are going to add a preferred name field for employees, then,
Add the preferred name column to the data table
Add the new preferred name input field to the form template
Add the new parameter in the controller layer to pass it to the backend
Complete the DAO layer function to save the preferred name parameter in the data table
2) In OrangeHRM 5.x you have the support from the application itself to create the custom fields for your entities. (I don't know about the 3.x versions.)
Related
I'm on magnolia 6.2.15 and I need to generate data from some fields that users insert in a content detail subapp.
I thought about creating a subclass of magnolia "SaveDetailSubAppAction", in the "execute" method to do the job.
I can retrieve fields value but, how can I generate new fields data values and insert that in the form before validation and commit to jcr datasource?
Well you can't. Or rather you shouldn't. The form is means for user to enter the data. If you create data programatically, you either send it directly to the datasource or store it directly on the node that datasource operates on.
If you want to show generated data to user for approval prior saving, then you need to create custom field that would have the place for extra input and would react on user generated input directly prior to saving content.
I have an entity field with a picklist and I want to let the user add new values to this when it's necessary. For now, I just can add new values from the Solution > Entity > Fields panel. Can this be done also when creating a new instance of the entity?
You can do this by calling the MetadataService. Capture the text value for the new entry from the user then add this via a call to the MetadataService in a plugin.
If it's likely that users will be adding a sufficient number of values themselves I'd consider using a lookup rather than a picklist.
I'm using Visual Studio 2010 to create a dynamic data site with scaffolding according to: http://www.asp.net/web-forms/videos/aspnet-dynamic-data/your-first-scaffold-and-what-is-dynamic-data
The site displays a SQL table with an "Insert New Item" link, which takes you here:
I have another SQL table which holds some of the information already. I would like to add a function that is called when the user navigates away from the "account" field; the function will query the other SQL table and populate the fields that it already holds for that account.
I'm stuck on where to put the function and how to setup the account field to call it.
It's a couple of years since I did one of these so pardon the details being a bit short.
You can 'override' the default New Item form. In that you can pre-populate the fields with anything you want. I think you have to take care of the Save also, and of setting out the controls on the form and populating them (you've overridden the generated form after all).
Another possibility is to create a partial class which extends the Model class and populates it in a constructor extension (I remember doing various stuff with this technique). There might also be some extension points on the model Context (or whatever its called) which you can tap into - it's pretty flexible as I remember.
I've got a model as described below :
I've also got a form to create a new product with a field entity building a dropdown list containing all the Brands.
Now I want to add a value "Other" in this list in order to allow the user to specify the Brand manually in another text field.
The question is: is there a clean way to manage this case (eg. adding the value "Other" in the list, which is not an entity and get the form validation to work) with Symfony2 forms?
You can do it in two ways,
You can subscribe for FormEvents::BIND_CLIENT_DATA form event. In the event method you can create new Brand object from the text, save it and set the id to the form by calling $event->setData($data). See this cookbook entry.
OR
You can append a data transformer. In its reverseTransform method you can create+save the object and return its id. See this cookbook entry.
My entity Person has a one to many relation with Tag entity. When creating a new person i'd like to show a textbox for assigning tag names separated by commas. User can then input an existent tag name or a new tag name (in this case, a new Tag entity is created and persisted).
Unfortunately entity field type has only checkbox and select representation. How can implement my own textbox representation?
You need to create a custom form type along with a custom data transformer.
This article is a pretty good guide on creating your own form type.
Also, check out Symfony's own source for the EntityType to get an idea of what's going on.
One way would be creating a custom data transformer.