Fixed width for Oxygen Text Box!
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 157
- Joined: Mon Aug 18, 2014 4:11 pm
Fixed width for Oxygen Text Box!
Hi,
We are using Oxygen Author 19.1 Eclipse version. For the <day> element inside <bookmap>, we have defined the text box like below,
Here we kept the columns as 2, so that user just enters 2 characters in the text box. But there seems an issue that when user enters more characters, it is getting accepted by the Oxygen. I have gone through oxy_textfield user guide, but I could not find any attribute which make the text box fixed.
We need to make the text box to be fixed to only allow 2 characters in the field. Is it possible using Oxygen CSS?
Regards,
Shabeer
We are using Oxygen Author 19.1 Eclipse version. For the <day> element inside <bookmap>, we have defined the text box like below,
Code: Select all
bookevent completed day{
-oxy-editable:true;
visibility:-oxy-collapse-text;
content:oxy_textfield(
edit, '#text',
columns, 2)
!important;
}
We need to make the text box to be fixed to only allow 2 characters in the field. Is it possible using Oxygen CSS?
Regards,
Shabeer
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Fixed width for Oxygen Text Box!
Post by alex_jitianu »
Hi Shabeer,
Unfortunately, the "columns" property refers only to the size of the form control. It means it will have a width that accommodates two characters. if the user types more, it will not receive any errors.
Currently, the text field form control doesn't have a mechanism to enforce such a behavior, but perhaps we can find some alternatives:
1. If these two characters come from a set of predefined values, you can use a read only combo box form control in which the user can only choose one of the existing values.
2. Through a Schematron rule, you can detect the cases when the user puts more characters and issue a warning. This warning will appear when the user commits the value into the document (in other words, it presses Enter or loses focus)
3. Implement a custom form control that has these checks. You can extend or start from the code of the existing form control to make things easier.
Depending on which path you which to take, I can provide more details about what you should do.
Best regards,
Alex
Unfortunately, the "columns" property refers only to the size of the form control. It means it will have a width that accommodates two characters. if the user types more, it will not receive any errors.
Currently, the text field form control doesn't have a mechanism to enforce such a behavior, but perhaps we can find some alternatives:
1. If these two characters come from a set of predefined values, you can use a read only combo box form control in which the user can only choose one of the existing values.
2. Through a Schematron rule, you can detect the cases when the user puts more characters and issue a warning. This warning will appear when the user commits the value into the document (in other words, it presses Enter or loses focus)
3. Implement a custom form control that has these checks. You can extend or start from the code of the existing form control to make things easier.
Depending on which path you which to take, I can provide more details about what you should do.
Best regards,
Alex
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service