0

Use textbox

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

cperezp2 gravatar image cperezp2
1

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

Comments

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
0

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.

<zk>
  <?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)} />
</zk>

https://www.zkoss.org/wiki/ZUMLReference/ELExpressions/Core_Methods

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

Follow
1 follower

RSS

Stats

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

Seen: 10 times

Last updated: Sep 10

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