I need to have "integer" + "select list", are there any plans to support "integer" fields?
I need it for money field, where select list is a currency.
I need to have "integer" + "select list", are there any plans to support "integer" fields?
I need it for money field, where select list is a currency.
Comments
Comment #1
chi commentedActually Double Field supports only one field type "Double field" with several widget types (Textfield, Select list and so on).
What does "integer field" mean?
Comment #2
clashar commentedI meant "integer" value in place of "textfield" widget.
For example I created double field of "Text field & Select list".
But I would like to use "Integer field & Select list"
Comment #3
chi commentedDo you want just verify that user-entered value is integer?
Comment #4
clashar commentedyes, as required.
Comment #5
chi commentedDouble field doesn't support validation of user-entered values. I suggest you take look at Field validation module that has the numeric validator.
Comment #6
clashar commentedDo you imply that Double field is compatible with Field validation?
Comment #7
chi commentedYes, it works well.
Comment #8
clashar commentedgood, thank you for quick replies!
Comment #9
hgurol commentedChi,
I believe the original poster didnt clarify the problem very well.
Let me try it myself.
Im using Double Field in more than one instance on my forms and content types. And since this module currently does not support the Integer or in my case the Decimal field, Im forced the use the Text Field for my number values. When I try to do some calculation with that number values in the text field. Im having HUGE headaches.
First and most, the rules module doesnt allow calculation of numbers if they are not stored as number fields like Integer, Decimal or Float. Current stable release of Rules do not have an option for data type conversion. Im using a patch for the rules to be able to convert data types. Even with that patch and that conversion feature it is still an headache, since now I have to convert the number value in the text field to the decimal type to make some calculations. And when Im finish to the calculation, I want to assign the resulted value to another (or same) double field. But then again, I can not assign a decimal value to a text field, so I have to convert that back to text field type before assigning that value to the double field's text field.
I can not tell you how much it would ease this process if Double Field was able to support number fields like Integer, Decimal and Float. Well, Im not sure about the Float since Im only using Integer and Decimal myself.
I dont know how hard or how time consuming it is but adding these number field types will make me very very happy.
Thanks...
Comment #10
chi commentedRules module is based on Entity API. There are many other data types that rules support. See http://drupal.org/node/905580
I cannot introduce them to Double field because this module is too simple for such things.
Comment #11
guypaddock commentedCome on, now... the post wasn't about supporting everything that Rules supports. It's about supporting numeric fields -- Decimal, Float, and Integer -- as exposed by the "Number" module in 7.x core.
The text field is nice and all, but one of the use cases you mention is "units" -- specifying the units on a number. That use case isn't complete if the user can't actually use this module with a numeric field.
If you can't address this, at least leave this open for someone else to come by and patch.
Comment #12
chi commentedI agree there's a need for this feature for some use cases. I am starting to work on this.
Comment #13
chi commentedCommitted to 7.x-2.x.
There is still a lot of work to validate user input according to the size of the field and rework integration with some contributed modules. However, I think it is ready to use for the most use cases.
Comment #14
k.skarlatos commentedit works for me (but i have not tested it too much)
Comment #15
chi commentedintroduced in 2.3 release
Comment #16
pomliane commentedExcellent news, thank you Chi! :)