Alle Ergebnisse anzeigen …


Generic selectors

Exact matches only

Search in title

Search in content

Post Type Selectors

In einem SAP Adobe Forms Formular soll der Inhalt eines Feldes in einer bestimmten Fonthöhe dargestellt werden. Nun kann es aber sein, dass beim Überschreiten einer bestimmten Anzahl an Zeichen die Variable die Größe des Feldes sprengt. In diesem Fall soll die Fonthöhe reduziert werden.

Im folgenden wird ein Workaround vorgestellt, wie dies erreicht werden kann.

[av_hr class=’invisible‘ height=’10‘ 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_uid=’av-3vczmjh‘]

[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_uid=’av-3m9h2nx‘]

[av_heading heading=’Anforderung‘ tag=’h3′ style=“ size=“ subheading_active=“ subheading_size=’15‘ padding=’0′ color=“ custom_font=“ av_uid=’av-2wy95b1′][/av_heading]

In einem WM-TA-Schein soll der Nach-Lagerplatz deutlich sichtbar in Fonthöhe = 50pt dargestellt werden. Üblicherweise ist der Lagerplatz kleiner als 6 Zeichen. In einigen wenigen Fällen ist der Lagerplatz jedoch größer als 6 Zeichen. Damit der Lagerplatz in diesen Fällen auch noch in das Feld passt, soll die Fonthöhe hier auf 30pt reduziert werden.

[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_uid=’av-2fq1wfx‘][/av_image]

Die Variable passt nicht in das Feld

[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_uid=’av-26mlhq5′]

[av_heading heading=’Einfügen von Code mit JavaScript‘ tag=’h3′ style=“ size=“ subheading_active=“ subheading_size=’15‘ padding=’0′ color=“ custom_font=“ av_uid=’av-1hhbwf1′][/av_heading]

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_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_uid=’av-1aim9kt‘][/av_image]

Zunächst wird eine Variable „len“ definiert. Mit der Methode „length“ wird die aktuelle Anzahl der Zeichen des Feldes ermittelt.

Ist das Feld größer als 7 Zeichen. wird, die Fonthöhe auf 30pt reduziert. In allen anderen Feldern bleibt die Fonthöhe so, wie sie auf der Palette „Zeichenformat“ definiert wurde.

[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_uid=’av-jnsgbh‘][/av_image]

Nach Einfügen des JavaScripts passt die Variable in das Feld

 

Weitere Informationen

Spezialthemen zu SAP Formularen

SAP Formulare zum Festpreis

SAP Formularentwicklung