Announcement

Collapse
No announcement yet.

Populating field from selection

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Populating field from selection

    Hello,

    Can you populate a field from what is chosen within a drop down box? I am trying to design a form for expenses and would like it to populate a field with a nominal code in it from what department they choose within a combo box.

  • #2
    Hi blakesale,

    This could be done via JavaScript. E.g. Populate a Text field from what is chosen in Combo box. I name the combo box ct and Add items Y and N, name the text field c1. Then right-click on the text field to open "Properties"->"General"->"Custom calculation script"->"Edit" then type info the following script:
    var c1=this.getField("ct").value;
    event.value=c1;

    After this, I switch to Hand tool, then if I choose Y in combo box, Y will be shown in Text field; if I choose N in combo box, N will be displayed in Text field.

    BTW, you could also download a demo from this link: http://exchange.foxitsoftware.cn/Che...n-Combobox.PDF

    Thank you.

    Comment


    • #3
      Hi Guys,

      The old demo link is not working, please download the demo file from the following link:
      http://sync-us.foxitsoftware.com/iss...InCombobox.PDF

      Here's how-to:
      1) Create a combo box, name it as ct;
      2) Create a text field, name it as c1;
      3) Right-click on the text field to open Properties > General > Custom calculation script > Edit, then copy the following script:
      var c1=this.getField("ct").value;
      event.value=c1;
      4) Switch to Hand tool, then check how it works for you.

      Hope info above helps. Thank you. If you have any further question, please email to [email protected] Attn: Cherry. Thank you.

      Comment

      Working...
      X