Feature #2227
Altering form elements for custom fields
50%
Description
Custom field templates let you change the rendering style of values for custom fields and only! And it would be cool to be also able to change the style of form elements for input of custom field values!
Let me show an example:
Saying we have a “Rating” custom field, which should get values from 1 to 5. For such custom field we will probably choose the “Text” type and regular expression ^[1-5]$
...
Right now we can use five stars to render values of such custom fields! For this we just define the string/rating
template.
But we would also want to use these five stars to let users choose the rating! This would be much better than a text field, which requires digits from 1 to 5!..
Replacing form elements for custom fields can be problematic though... But still it should be possible to “attach” JavaScript to such elements! And using JavaScript we can do what we need!
Associated revisions
Added support for edit templates (#2227)
History
#1 Updated by Andriy Lesyuk about 11 years ago
It’s about custom_field_tag
and custom_field_tag_for_bulk_edit
in CustomFieldsHelper
... Also maybe custom_field_tag_with_label
.
#2 Updated by Andriy Lesyuk about 11 years ago
- Status changed from Open to In Progress
- Start date changed from 16 Sep 2013 to 21 Sep 2013
- % Done changed from 0 to 50
This would also need some JavaScript API. For example, I plan to write a JavaScript function named, e.g., hide_original_custom_edit(field_id)
, which will make the original for element invisible.
#3 Updated by Andriy Lesyuk over 10 years ago
- Target version set to 0.2.4