Feature request : additional data in a field
-
Hi again,
Not sure it makes really sense, but I try…
I’ve written a little addon to add a URL field, based on the sample code you gave in another thread, with a sample email field.
It works great, but… When you enter a URL, there might be 2 information :
– the link
– the text of the link
the first one is thehref
attribute of the<a>
tag, the latter the text wrapped with the tag.It is perfectly possible to achieve what I have in mind with 2 fields, my custom URL field and a “basic” text field.
Do you think it would be relevant, when specifying a URL, to allow user to give both information, without the need to add 2 fields ?
Actually it seems to me it makes sense : before posting, I tried to achieve this with 2 fields and it’s possible within the template only. User must write the html code of the
<a>
tag to use a link with a different text :
<a href="[uf key="website_link"]">[uf key="website_link_text"]</a>
whereas storing both information for the single URL field would allow to simply use in a template :
[uf key="website_link"]
theprocess_value()
method would then receive an array for the first argument, containing link and text.What do you think of this ?
- The topic ‘Feature request : additional data in a field’ is closed to new replies.