Hi everyone,
I have a problem to find hint text variable. I want to set the hint text value as floating label.
i found a solution in here:
but in this solution, label, its just a label and not a variable of hint text.
Hi everyone,
I have a problem to find hint text variable. I want to set the hint text value as floating label.
i found a solution in here:
but in this solution, label, its just a label and not a variable of hint text.
I’m not sure what you mean by “variable of hint text” but you can’t style a Text Field widget’s Hint Text to appear outside of its border. You’ll need to use a separate widget, which you can style to look like the Hint Text. You can use the Text Field’s Focus event to hide the “floating hint” widget" and its Lost Focus to show that widget, with conditional case to show it only if the field is blank, just like the Hint would behave. Something like,
Focus
Hide
MyFloatingHint
Lost Focus
If length of value of This equals “0”
Show
MyFloatingHint
i’m so sorry, my english is not very well.
this is what i want:
but i want the label float to the top of the text field.
That website has CSS code that you can include as an Axure Cloud plugin. Here is the Axure reference documentation for this feature:
If you can’t use Axure Cloud, it is possible to include it in your local prototype via javascript injection. This method is not supported by Axure, but there are plenty of examples of how to do it in this forum. Just search for “javascript injection”.
The examples on that website have labels that do float to the top of the text field… I don’t understand exactly what you want to be different… There is also no hint text used–only labels. The hint property of a text field is not accessible, nor can it be styled, so you don’t want to use hint text for this purpose.
Based on your sketch above, it looks like you want the label to move above and outside the text field. Is that correct? That can be done using the method that @huban posted in your forum link; you just need to adjust the position of the “floating label” widget in the active and error states of the “floating label” dynamic panel.
Or, by “float to the top” do you mean you want the label text to move and shrink at the same time in a fluid, smooth animated way? That kind of animation can be difficult in Axure, but is possible.
See Page 3 of this updated .rp demo file. I styled the look and feel, including animations, to match that getbootstrap.com website example.
input field v2.rp (175.1 KB)
Details:
@masoud
While @mbc66 provided you with a good solution, here is another one that I have been using for all my forms. This will provided you with an error state as well. Sample form field.rp (66.9 KB)
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.