Is it possible to dynamically create form fields in PDF form?

Hi all,
I would like to dynamically create object like textbox, dropdown list from xml data. For example:
When I receive following xml data:
<field name="Check Box" type="selectbox"/>
<field name="Text Field" type="textbox"/>
I want to generate 2 form fields check box and text field with title "Check Box" and "Text Field" accordingly.
Is it possible to do it in javascript for PDF form?
Thank you and regards,
Anh

You cannot dynamically create objects on the fly like that but you can create interpret the XML and create an XDP file (which is the language of the template file) then bring that into Designer and create a PDF from that.
Paul

Similar Messages

  • Dynamically create Form Guide

    Is it possible to dynamically create a form guide using a data model? We want to be able to control what fields are hidden and visible based on the data. Can this be done through XML?
    Aditya

    I need to create dynamic form guides which can be controlled by data or schema . Don't know if Form Guides can interpret XFA/XML data or even XSD.
    We store information in a database, which varies by user. When a user accesses the guide, I need to create an XML/XFA, from the database, and pass it to the guide. This should determine which fields appear.... 
    The company wants to refrain from JS which is another challenge... 
    - Is there a way to dynamically change the appearance of the guide based ONLY on data? For example, hide or display fields
    - Similarly, is it possible to control access to certain fields base ONLY on data? For example, Read Only vs Editable.
    Aditya

  • Referring to dynamically created form items

    I have a requirement where I do not know how many rows are going to be added into a table from a form. What I have done is used javascript to dynamically create form fields. This is along the same lines as a tabular form, however it should not save any of the data until the whole page is submitted.
    My problem is, how do I then refer to these form items within a PL/SQL procedure?
    Below is the piece of javascript that creates new rows on the form (the options for the select item are fed in using ajax). And following that, the pl/sql loop that I have attempted to use which doesn't work.
    NOTE: The onchange attribute on each of the form elements was to try to set a session state variable for each of the items. I got this from the following blog post.
    http://deneskubicek.blogspot.com/2009/01/ajax-setting-item-session-state.html
    Javascript
         var objectFormCount = 0
         function addObjectForm() {
              var newFormHTML = '<tr>';
              newFormHTML = newFormHTML + '';
              newFormHTML = newFormHTML + '<td><select onchange="f_setItem(this.id)" name="f01" id="f01_' + objectFormCount + '"></select></td>';
              newFormHTML = newFormHTML + '<td><input onchange="f_setItem(this.id)" type="text" name="f02" id="f02_' + objectFormCount + '"/></td>';
              newFormHTML = newFormHTML + '<td><input onchange="f_setItem(this.id)" type="text" name="f03" id="f03_' + objectFormCount + '"/></td>';
              newFormHTML = newFormHTML + '<td><input onchange="f_setItem(this.id)" type="text" name="f04" id="f04_' + objectFormCount + '"/></td>';
              newFormHTML = newFormHTML + '</tr>';
              $('#BackEndObjectTable').append(newFormHTML);
              objectFormCount++;
    PL/SQL
    FOR i IN 0..l_oracle_script_count
    LOOP
    --DEBUGGING VARS
    l_test1 := v('f01_' || i);
    l_test2 := v('f02_' || i);
    l_test3 := v('f03_' || i);
    l_test4 := v('f04_' || i);
    l_test5 := i+1;
    INSERT INTO MIGRATION_B_OBJECT (MIGRATION_B_ID,TARGET,SCHEMA,SCRIPT_LOCATION,SCRIPT_NAME,RUN_ORDER)
    VALUES (l_mig_seq,v('f01_' || i),v('f02_' || i),v('f03_' || i),v('f04_' || i),i+1);
    END LOOP;
    Edited by: Dopple on 28-Jul-2011 01:59 - text was stripped from the body of the post.

    For anyone with the same requirements. What I had to do was add the value of each form element into a temp table which was basically held key/value pair (form item/value) along with the username, the table that is to be updated and the row number.
    Once the actual page was saved, the procedure built up an insert sql string from the values in the temp table and inserted each row.
    Works a charm, although spitting the data back out into the dynamic forms is going to be a chore!!!!

  • How to get the co-ordinates of a dynamically created input field

    Hello Frn's
    i have created a dynamic text view . but this text view is not appearing at proper position . I want palce it infront of a dynamically created input field . how can i do this ?
    as i am thinking ...i should first of all  get info about the co-ordinates of   dynamaclly creatd input field . and with respect to these co-ordinates ...set the position of  text View .
    Please suggest  your thoughts .
    Thanks and Regards
    Priyank Dixit

    Hi,
    There is no provision in WD for getting screen coordinates and then placing the UI element.
    You to add the UI element to layout editor and based on the layout type it will add the UI element to respective position.
    I would advice not to create dynamic UI elements( instead you can create them statically and then play with visibility status through context binding ). This will be more effective way and less error prone. This is also recommended practice.
    still,For dynamic creation you can refer to following wiki:
    http://wiki.sdn.sap.com/wiki/display/WDABAP/CreatingUIElementsDynamicallyinAbapWebdynpro+Application
    regards
    Manas Dua

  • How to delete Dynamically created input field UI Element

    Hi all,
              I want to delete dynamically created input field and label.
    Is there any method please tell.
    Thanks in advance
    Hemalatha

    Hi,
    In the WDEVENT parameter of the action handler you can find the event id.
    ***Variables
      DATA:
        lv_selected  type string.          "Selected tab value
    ***Structure and internal table for the Events and messages
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
    ***Field symbols
      field-symbols: <fs_value> type any.   "Attribute value in events table
    ***Move the event table to lt_events
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'SAVE'.  "Button Id
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.
        if sy-subrc eq 0.
          lv_selected  = <fs_value>.
        endif.                 "IF sy-subrc eq 0.
      endif.                 "IF sy-subrc eq 0.
    Regards,
    Lekha.

  • Is it possible to dynamically create xml nodes?

    Hi,
    Is it possible to dynamically create child nodes of an xml
    file with flash??
    Im what i want to do is save a users name etc in an xml file
    without having to manually add nodes in.
    So when a user clicks a button to save their details a new
    node is created.
    Thnx

    Yes.
    Look
    at XML.appendChild as a starting point.

  • Dynamically created text field doesn't appear when imported

    Greetings,
    I have 2 issues regarding dynamically created text fields.
    What I'm trying to do is to create a text field inside a swf file,
    then import that swf into another file. The main problem is, the
    text field is created and displayed perfectly when i execute the
    first swf, but when i try to import the whole thing into another
    file, the text is not displayed.
    I have to point out that, when I add "stage" before the
    addChildAt command, the text appears, but I don't want the
    coordinates of the text box depending on it's location on the
    stage.
    The second problem is, I want the scroll buttons to appear if
    the text is longer than the text box, however they appear no matter
    what. I trace the values and they are correct, so I can't really
    understand why they keep appearing.
    Thank you very much for your help.

    The same thing is happening to me and it is starting to get annoying. I too am using Chrome and I think that might just be part of the issue. I am running a Macbook Pro 2010 13". Any insight on this would be helpful. Sorry I don't have a solution, but know that your not alone in dealing eith this issue.

  • Is it possible to dynamically create a user variable at runtime from within a Widget?

    I'm trying to develop a custom Interactive Widget. This widget will allow the user to take multiple attempts, and needs to store information about previously completed attempts so they can (hopefully) see their improvements over time.
    I'm trying to figure out the best way to store the data about the previously completed attempts across multiple sessions in a LMS. It seems that the data stored in user variables is automatically stored/restored in suspend_data, which would be perfect. The issue is that I can't find a way to dynamically create a new user variable from within a Widget. It looks like I can only access user variables that the author has explicitly defined in the Captivate interface. I'd rather not have to force the author to define an empty User Variable that they'll never knowingly use, just to give the Widget a bucket to store its data.
    Does anyone have any ideas for what might be the best way to accomplish this? I'd like to stick to standard, "approved" APIs as much as possible, but I'd be willing to bend some rules if necessary.
    Thanks!

    Ryan,
    I assume you've asked this question here:
    https://groups.google.com/forum/?fromgroups#!topic/elearning-technology-and-development/e5 vWZfJ6X8I
    I asked a similar question here:
    https://groups.google.com/forum/?fromgroups#!searchin/elearning-technology-and-development /leichliter/elearning-technology-and-development/Au88bu7LB5o/TC7xlo8iBpQJ
    Philip gave you sound advice.  You'll have to hijack/re-purpose the comments or the suspend data.  I was successful in using SCORM comments in a Moodle system to store extra data I needed for a customer.  It's not ideal, but it gets the job done. Here's a thread about that:
    https://groups.google.com/forum/?fromgroups#!topic/elearning-technology-and-development/Yg YAMGfXQNw
    If you use suspend data, you have to watch out for a few things:
    1.  It's base 64 encoded... so any data you append to what Captivate outputs will need to be in base 64 (that's a good practice anyway since the data has to be serialized).
    2.  On course re-entry, you'll need to capture the suspend data before it hits Cp to strip off / read your needed data.  If the suspend data isn't in the format Cp expects, you'll get a nice white screen of death.
    Ideally, it would be nice to be able to dynamically create user variables for purposes like this... and it's been requested in Cp 6.... we'll see if it gets added (not holding my breath).  Until then, I'd use cmi.comments.
    Jim Leichliter

  • Is it possible to dynamically create psp variables?

    I'd like to be able to dynamically create psp variables on the fly.  Without getting into details; using straight shared variables defined in a library is too constraining for my application.  I've found that I can create PSP variables dynamically using DataSocket VIs in the System directory (psp://localhost/system/), though I can't seem to do it with the LV Shared Variable VIs.  I was just curious if there was any way to programmatically create psp variables without using DataSocket VIs.

    In the client yes,
    Dynamically Creating Shared Variables
    The SVE will automatically create the target variable with default properties when a client attempts to connect to a URL with the following format.
    psp://computer/System/shared_variable, where shared_variable is the named tag for the data."
    On the server you create them. I believe, if my memory is correct, if you have DSC option there is code to dynamically create them on server side.

  • Dynamically creating/modifying fields

    Hi there,
    I'm having difficulty dynamically adding or modifying fields in a report using XML.
    My sample report selects all the fields in a table (select * from TableName;), where some of the fields are mandantory for the report. The other fields are optional and selected by a user at runtime.
    So, a user selects the optional fields and passes them in as parameters. I check the parameters in the "After Parameter Form" trigger and, if they're set, I try to add or modify a field in the report using some XML, such as:
    <report name="Test1" author="Mark Kennedy" DTDVersion="1.0">
    <layout>
    <section name="main">
    <field name="F_UDC1" source="LOCATION">
    </field>
    </section>
    </layout>
    </report>
    The above XML tries to dynamically set the source of the field to LOCATION, which is one of the fields in the database table.
    If F_UDC1 exists in the report, I get an error message: "REP-0002: Unable to retrieve a string from the Report Builder message file." If F_UDC1 doesn't exist, nothing happens. No new field is created or shows up in the report.
    Any ideas on what I'm doing wrong? Thanks!
    Mark Kennedy
    [email protected]

    Scott,
    You should be able to do this with a report. You can make columns in a report into text boxes. I'm not sure exactly what I would do, but if you do something like
    select null c1, null c2, null c3, null c4 from
    user_objects where rownum <= :P123_NUM_ROWS
    you should get for null columns. Now go edit each of those columns and make them text fields.
    You can then submit the page and use the htmldb api's to get the values of those text boxes.
    You might also use a collection . . . I'm just thinking as I type, but this should give you some ideas.
    Anton

  • Dynamically created Text field inside of empty Movieclip

    Hi there.
    My goal is to have a button that, when clicked, an empty
    movieclip is created and a text field is attached to it.
    I could write it easily if the newly created instance names
    where hard coded, the problem comes with the syntax to generate
    them dynamically.
    Here's the code i have so far:
    ActionScript Code:
    button.onRelease = function() {
    createText();
    var count:Number = 1;
    createText = function () {
    _root.createEmptyMovieClip("placeholder"+count,this.getNextHighestDepth());
    this["placeholder"+count].createTextField("my_txt"+count,
    this.getNextHighestDepth(), 100, 100, 100, 100); count++;
    After that's done i still need to assign a text value to the
    text field, which i have no clue on how to do it...
    In other words I want to accomplish something like:
    placeholder[count].my_txt[count].text = "my text";
    I hope it's not confusing... Any help would be greatly
    appreciated.
    Thanks in advance!

    if your createText() function isn't working the way you want
    check your use of "this" and "_root". if they're not the same,
    you're not referencing your newly created movieclip correctly. and
    your textfield depth isn't what you really want, but it should work
    ok.

  • Dynamically create Text Fields

    hi,
    i hav a form which contains 2 radio buttons.
    ...If v click one radio button, a text field should be displayed and should contain information returned by view object.
    ...If v click another radio button, the previous text field should not appear and new text firld should appear and should contain information returned by another view object...
    .....can anyone say how can this b done?....

    To make a textfield programmatically you can use something like this:
        public CoreOutputText createOutputText(String text) {
            CoreOutputText label = (CoreOutputText)FacesContext.
                    getCurrentInstance().getApplication().
                    createComponent(CoreOutputText.COMPONENT_TYPE);
            label.setValue(text);
            //System.out.println("label id = " +label.getId()); //TEMP
            return label;
        }I put that method in a UIComponentFactory class. To add the created OutputText to your PanelPage for instance you do:
    CoreOutputText output = UIComponentFactory.getInstance().createOutputText();
    getPanelPage().getChildren().add(output);Like this you add the output text to the the children of the panelpage.
    To remove the output again you can use getPanelPage().getChildren().remove(output);

  • How to dynamicly create a field name AND access it

    All,
    I am trying to build a code block that will access what amounts to a table structure inside a table. I have 38 occurances if a set of 3 fields. (Source system had an internal array/occurs clause that was converted for our ODS into individual fields) I am returning a single row as a row type and have addressability to all fields. What I am trying to avoid is coding my logic block 38 times, 1 for each occurance.
    FOR X IN 1 .. 38 LOOP
    V_CAT_CD_X := 'CAT_'||X||'_CD';
    End Loop;
    The following is the display of the correctly built field:
    --> Loop Cat CD: CAT_1_CD Rec count:1 Loop counter:1
    --> Loop Cat CD: CAT_2_CD Rec count:1 Loop counter:2
    --> Loop Cat CD: CAT_3_CD Rec count:1 Loop counter:3
    --> Loop Cat CD: CAT_4_CD Rec count:1 Loop counter:4
    My problem is that my row cursor PP1 is addressable hardcoding PP1.CAT_1_CD or PP1.CAT_2_CD ect, however I am having problems using my created string to access the field.
    What do I need to do to gain accessability via this method?
    I do have the ability to select the column names from the system tables but even then, I am lacking addressability to my ROW type using the selected field name.
    Thanks
    Greg

    Not sure if this is what you are looking for:
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2  my_cur SYS_REFCURSOR;
      3  v_rec mytest%rowtype;
      4  cursor c1 is select column_name from all_tab_cols where table_name = 'MYTEST';
      5  v_sql_stmt VARCHAR2(1000) := NULL;
      6  BEGIN
      7  v_sql_stmt := 'SELECT ';
      8  FOR I IN c1 LOOP
      9  v_sql_stmt := v_sql_stmt||I.column_name||',';
    10  end loop;
    11  v_sql_stmt := RTRIM(v_sql_stmt,',');
    12  v_sql_stmt := v_sql_stmt||' FROM mytest';
    13  open my_cur for v_sql_stmt;
    14  LOOP
    15  FETCH my_cur INTO v_rec;
    16  EXIT WHEN my_cur%NOTFOUND;
    17  dbms_output.put_line(v_rec.a);
    18  END LOOP;
    19 close my_cur;
    20* end;
    SQL> /
    1
    2
    PL/SQL procedure successfully completed.
    SQL> Edited by: AP on Nov 17, 2010 5:29 AM

  • AS3: How to get height of a dynamically created text field

    I am importing text from an XML file and want the lines of text to display in separate text fields beneath each other. How can I set the y value of each succeeding text field so that there is some space (40 pixels or so) from the above field, regardless of the length of the text? Here is my current code. Any help would be greatly appreciated.
    var textArray:Array = new Array();
    for (var i:int; i <myXML.TOPIC[0].QUERY.length(); i++) {
    var textField:TextField = new TextField();
    textField.htmlText = myXML.TOPIC[0].QUERY[i].QUESTION;
    textField.x = 100;
    //below is my problem....I want the y value to be based on the height of all the previous text fields that have been created
    textField.y = 100+(40*i);
    textField.border = true;
    textField.width = 800;
    textField.textColor = 0x000000;
    textField.multiline = true;
    textField.wordWrap = true;
    textField.selectable = false;
    addChild(textField);
    textArray.push(textField);

    There's nothing wrong with the approach you took... retain it as is.  What I was suggesting is basically the same, just a slightly different angle that doesn't need the conditional....
    var currentY:Number = 100;
    for (var j:int = 0; j <myXML.TOPIC[0].QUERY.length(); j++) {
       textArray[j].y =  currentY;
        // text gets added somewhere in here
        currentY =  currentY+textArray[j].height+5;

  • How to Access the Dynamically created form element

    Hi friends,
    I have generated a dynamic form in flex using xml and i want to save the all the elements of the form with there label and entered data in the formItem.
    so i m getting how to save the data.
    anybody have idea about this?????
    Thanking you
    Gajanan

    Thanks for your reply.
    as u said i have done this
    for each(var formItem:FormItem in form.getChildren()){
                            formItem.label //The FormItem's label's text
                            formItem.getChildAt(0) //The first child - TextInput, ComboBox or whatever you got
                            Alert.show(formItem.getChildAt(0).toString());
                            return;
    my first child formitem is TextInput and i entered some value in tat textInput but i m printing this i m getting the "dynamicform.ApplicationSkin3._ApplicationSkin_Group1.contentGroup.grp.Form0.FormItem15.txt studentfname"  i m getting this output
    i want to access the entered value of in the textInput.
    Thanks,
    gajanan

Maybe you are looking for

  • Color format upon condition in RTF

    Hi will anyone help me in this issue i've a column i want when it be a negative value to display its font in red . how can i apply that in rtf template ???

  • Interface between sap to non sap using edi idoc

    hello abaper's,                      i have requirment on creating Interface program for downloading files(PO)  from Non-sap system  to sap system using EDI Idoc techniques.pls give me a good tips for this requirment.. With Regards MurugeshRajeev

  • Problem In report output display when i run in the background

    Hi, In a classical report i am printing around 17 fields  the width of the report out put is around 800 characters. If i run  the report in the  fore ground it running perfectly. But the thing is when i give large selection is it GETTING ' TIMED OUT

  • Substitution Variable update issue

    Hi, I am using Essbase 9.2.0.3. I have noticed a problem afetr updating Substitution Variable. The calculation script which uses the Substitution Variable works well after updating the variable. But the Member formula doesn't work, unless we restart

  • Separate folder for class files (eclipse)

    hello :) in eclipse how do i specify a different dir to output my class files to ?