Embedding a Lectora Variable inside a text in a textfield

Hello

I want to be able to have a textfield which says something like:

"Hello Andrew, welcome to blah blah..." where Andrew is actually a Lectora variable e.g. VAR(first_name).

is there a way of doing that without using Javascript? Easy enough to do in JS but more work.

Thanks

Discussion (10)

In fact you can...

-Delete the action from the textfield..-Change the text to: VAR(firstName) had a little lamb, its fleece was white as snow.

And that works too...

Its a Lectora 16 feature. Wasn't available yet in Lectora 12 ;-)

Mmmm hard to tell..i will edit your sample and reupload it, maybe you can figure out from there what you do differently...

Oh my goodness. My university group bought two Lectora 12 licenses in December (not knowing that Lectora 16 was coming out)...

Thanks to both of you.

undefined

Yes. You can use an variable in the change contents action. You can then trigger it in various ways such as on page show, by a button click, etc. In the example (version 12.1.4) I used a click on the text itself. 

Darrel

Ahhh. You have to wonder why it wasn't in there from the beginning. Thanks, Math.

Darrel

Hey, Math. When I do that I don't get the variable, I get literally "VAR(firstName)..". What am I doing wrong?

Darrel

Hello Darrel - Thanks a lot. You are so helpful.

Yes I was aware of the technique you showed, but I was hoping there might be something even simpler where you would simply insert a variable name in a complex text which you could format with the WYSIWYG editor in the textbox.

Cheers and t hanks again

Andrew

undefined

Maybe there is an option for upgrading. Certainly worthwhile... L16 is good ( i dont have any stockoptions in Trivantis ;-)

Sounds like you need to upgrade ;) (no stock options either but definitely a vested interest)! The functionality Math is describing is our in line variable replacement. You can see a quick video about it here: http://community.trivantis.com/knowledge-base/inline-variable-replacement/

Discussions have been disabled for this post