[av_textblock size=” font_color=” color=”]
In an SAP Adobe Forms form, the content of a field is to be displayed at a certain font height. However, it can be that the variable exceeds the size of the field when a certain number of characters are exceeded. In this case, the font height should be reduced.
In the following a workaround is presented, how this can be achieved.
[/av_textblock]
[av_heading heading=’Requirement’ tag=’h3′ style=” size=” subheading_active=” subheading_size=’15’ padding=’0′ color=” custom_font=”][/av_heading]
[av_textblock size=” font_color=” color=”]
In a WM-TO form, the post-storage location should be clearly visible in font height = 50pt. Usually, the storage location is less than 6 characters. In a few cases, however, the storage space is larger than 6 characters. To ensure that the storage space fits into the field in these cases, the font height should be reduced to 30pt.
[/av_textblock]
[av_image src=’http://solidforms.de/solid_wp_2014/wp-content/uploads/2016/03/SAP-Adobe-Forms-Überschreiten-Fonthöhe-1.png’ attachment=’16032′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’][/av_image]
[av_textblock size=” font_color=” color=”]
The variable does not fit into the field
[/av_textblock]
[av_hr class=’invisible’ height=’-50′ shadow=’no-shadow’ position=’center’ custom_border=’av-border-thin’ custom_width=’50px’ custom_border_color=” custom_margin_top=’30px’ custom_margin_bottom=’30px’ icon_select=’yes’ custom_icon_color=” icon=’ue808′ font=’entypo-fontello’]
[av_heading heading=’Insert code with JavaScript’ tag=’h3′ style=” size=” subheading_active=” subheading_size=’15’ padding=’0′ color=” custom_font=”][/av_heading]
[av_textblock size=” font_color=” color=”]
Zum Zeitpunkt “Initialize” wird folgendes JavaScripting eingefügt.
var len;
len = this.rawValue.length;
if (len>8){
//this.font.size = “50pt”;
} else {
this.font.size = “30pt”;
}
[/av_textblock]
[av_image src=’http://solidforms.de/solid_wp_2014/wp-content/uploads/2016/03/SAP-Adobe-Forms-JavaScript.png’ attachment=’16033′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’][/av_image]
[av_textblock size=” font_color=” color=”]
First, a variable “len” is defined. The method “length” determines the current number of characters in the field.
The field is larger than 7 characters. The font height is reduced to 30pt. In all other fields, the font height remains as defined on the Character Format palette.
[/av_textblock]
[av_image src=’http://solidforms.de/solid_wp_2014/wp-content/uploads/2016/03/SAP-Adobe-Forms-Überschreiten-Fonthöhe-2.png’ attachment=’16031′ attachment_size=’full’ align=’center’ styling=” hover=” link=” target=” caption=” font_size=” appearance=” overlay_opacity=’0.4′ overlay_color=’#000000′ overlay_text_color=’#ffffff’ animation=’no-animation’][/av_image]
[av_textblock size=” font_color=” color=”]
After inserting the JavaScripts, the variable will fit into the field
Further information
Spezial topics to SAP forms
Fixed price SAP forms
SAP form development
[/av_textblock]
