cancel
Showing results for 
Search instead for 
Did you mean: 

adobe frms, field visible / not visible

Former Member
0 Kudos

Hi,

i created a new form (TA SFP)... works well!

Now i had a new requirement:

i added a field to the form (MATNR) from my own structure.

If this field is not initial within the calling program, the field has to be shown on pdf.

if the field is initial - the field has to be invisible on the pdf.

is there a possibility to do this?

Thx for any answers.

Thomas

Edited by: Thomas Feldmann on Nov 25, 2010 8:59 AM

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Remember to set the form as Interactive in stead of Static form.

Former Member
0 Kudos

Hi Nyap,

Even if the form is static the script would still execute and make the field visbility dynamic.

This is how we do for output forms

Regards,

Sai

Former Member
0 Kudos

Hi,

thx, but where and how?

Sorry but i have no java knowledge

XML-Code for this field:

<field name="MATNR" y="149.225mm" x="38.1mm" w="62mm" h="9mm">

<ui>

<textEdit>

<border>

<?templateDesigner StyleID aped3?>

<edge stroke="lowered">

</edge>

</border>

<margin/>

</textEdit>

</ui>

<font typeface="Arial"/>

<margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>

<para vAlign="middle"/>

<caption reserve="25mm">

<font typeface="Arial"/>

<para vAlign="middle"/>

<value>

<text>Artikel</text>

</value>

</caption>

<value>

<text maxChars="18"/>

</value>

<bind match="dataRef" ref="IS_GRUNDDATEN.MATNR"/>

<desc>

<text name="Schema-Anmerkung">Artikelnummer</text>

</desc>

</field>

<?templateDesigner expand 1?>

is this the correct place?

Former Member
0 Kudos

The one you posted here is a xml script we dont edit xml script.

In SFP TCODE..

View the form in Design View.

Click on the Textfield you have.

Now go to pallets-->scripteditor from the menu bar.

a page is visible just above to your designview tab or right side of your editor.

in the 1st dropdown select formready

in the 2nd dropdown which is located right most corner of this script editor select java script.

and just copy paste my code there

Thats it.

If you want to test it locally before activating the form.

Select the field in object prioperties pane goto value tab put some value in the default. now select the preview pdf tab and viceversa.

Let me know if u need more help.

Regards,

Sai.

Former Member
0 Kudos

Hi Sai,

thanks! I found it.

Regards Thomas

Former Member
0 Kudos

Hi Thomas,

If you're using Formcalc instead of JavaScript as Script language, then you can use a predefined function for checking initial: Function HasValue( ).

regards

Former Member
0 Kudos

Hi Thomas,

Select the field go to script editor-->formReady event. (javascript)

have the below code

 this.presence = (this.rawValue == null || this.rawValue == "") ? "hidden" : "visible"; 

Regards,

Sai