Use textbox

asked 2020-09-04 14:18:22 +0800

cperezp2 gravatar image cperezp2

I have 4 textbox, for the first 2 the name and surname will be entered, in the third a series of numbers will be entered, and in the 4 that shows the first letter of the name + the first letter of the last name + the sum of the entered numbers. example: Rick Mayers 12345

result in the forth text box: R M 15

delete flag offensive retag edit


are you using MVC or MVVM? this information helps to provide a dedicated example

cor3000 ( 2020-09-11 10:28:21 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-09-10 23:52:34 +0800

tinawang gravatar image tinawang
157 2

You can use the tag library to get the first alphabet in the names.

  <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
  <textbox id="tb1" value="Rick"/>
  <textbox id="tb2" value="Mayers"/>
  <textbox id="tb3" value="${c:substring(tb1.value, 0, 1)} ${c:substring(tb2.value, 0, 1)} />


link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2020-09-04 14:18:22 +0800

Seen: 11 times

Last updated: Sep 10 '20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More