including hyperlinks and email addresses with a text field

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

including hyperlinks and email addresses with a text field

#1

Postby neilnewman » Thu Jun 11, 2015 3:27 pm

We have a system written in Ebase and would like the input field to allow us to include hyperlinks etc within the text.
Is there a way to do this?
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Jun 11, 2015 4:50 pm

There are two options that I can think of:

1. You can make an entire field a hyperlink by clicking the Hyperlink property of a Field Control. If you want to embed this in a larger sentence you also need to uncheck the Display label and Display help properties of the Field Control. Then you just get the field value displayed as a link.

2. Add a Hyperlink control and include a field value inside the text as &&FIELDNAME.

In both cases you can make the hyperlink either internal (fires an ebase event when clicked) or external (fires an external URL).
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

#3

Postby neilnewman » Fri Jun 12, 2015 7:24 am

Hi Jon,
The hope was that the Ebase application could allow the end user to add free form text into a field which could include email addresses and links to webpages.
Rather than a dedicated hyper-link field

Thanks
Neil
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#4

Postby Steve James » Fri Jun 12, 2015 9:15 am

Hi Neil are you asking if a user can type some content in and Ebase sorts it out to be valid html?

If so have you looked at various wysiwyg editors? That is a jquery editor that stores the correct html in an Ebase field?
A number of users have used TinyMCE
http://forum.ebasetech.com/forum/viewto ... ht=wysiwyg

If it is just simple urls or emails then you could have a script to do a regex replacement and wrap found urls with the appropriate html a,href,target.
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

#5

Postby neilnewman » Fri Jun 12, 2015 1:51 pm

Wow thanks for the info Steve, it is a great little gem.

I see that it stores the html code with the data, when it write the data into a database record, however when I then display this data as a "read only" field rather than a writeable "text area" it fails to interpret the code and displays the html coding,.
Any pointers please as to how I get the read only fields to render the content correctly via TinyMCE.
0 x

neilnewman
Ebase User
Posts: 201
Joined: Fri Dec 20, 2013 1:29 pm
Location: Dartford Borough Council
Contact:

#6

Postby neilnewman » Fri Jun 12, 2015 2:21 pm

Found the answer, I just needed to tick "field contains html"
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#7

Postby Steve James » Mon Jun 15, 2015 7:56 am

Excellent, glad it is of use.
0 x


Who is online

Users browsing this forum: No registered users and 16 guests