Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Designer is making forms incompatible

Avatar

Former Community Member
After editing forms in Designer, I am no longer able to edit the form in Acrobat Professional.



Also, Designer seems to be changing the names of botton controls within the form. For example, I named a button "DCSubmitFV1_0" within Designer. Inside Designer, the button name shows correctly, but in actuality, the button is named "F[0].P1[0].DCSubmitFV1_0[0]" making it not work with our system.



Is there a way to revert the form to the Acrobat Professional format, after the form has been edited in Designer? Or is there a way to specify how Designer really names form controls?
6 Replies

Avatar

Former Community Member
Once you bring an AcroForm into Designer it is converted to an XFA form. They are two entirely different technologies and you can't edit an XFA form in Acrobat because it wouldn't work at all even if it let you.



Once it's an XFA form there is no converting technology in Acrobat to turn it back into an AcroForm.



XFA is an XML technology, so it's basically a DOM. The field name is still DCSubmitFV1_0, but the full path in the DOM is F[0].P1[0].DCSubmitFV1_0[0] which is basically formName.subFormName.fieldName.



You're likely trying to use Acrobat JavaScript like the getField() method? If so, you probably won't find any success doing this instead of using XFA JavaScript with an XFA form, depending on what your trying to do.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
I'm not sure what all is going into the system. Is there a way to explicitly name the button without the extra stuff?



This appears to be the script that runs when the submit button is pressed:



var dcProceed = true;

for (var iFieldCount = 0; iFieldCount < this.numFields; iFieldCount++){

var dcfname = this.getNthFieldName(iFieldCount);

var dcLoopField = this.getField(dcfname);

if (dcLoopField.type != "button"){

if (dcLoopField.required) {

if ((dcLoopField.value == null) || (dcLoopField.value != "0" && dcLoopField.value.replace(/^\s+|\s+$/, '') == "")){

app.alert("The field with name " + dcLoopField.name + " is required. Please enter a value before submitting.", 1, 0, "Field is required");

dcProceed = false;

break;



}

}

}

}

if (dcProceed){

var dSubmit = this.getField("DCSubmitFV1_0");

dSubmit.display = display.hidden;

this.submitForm("http://serverurl/acroformlistener?reqtype=save&code=00000000000000000000000000000000000&docclass.id=00bd8785-6d11-420a-90b2-3c4a6ebfc50c&template.create=true&template.uniqueid=779a743f-9b39-4f12-859d-0076500722ac&template.id=a2d0cfbe-25ed-4e7d-9cea-c2db301d7d4d&#FDF");

}

Avatar

Former Community Member
No, there is no way to explicitly name the button without the extra stuff.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Thanks for your replys. Do you by chance have a recomendation for a way to incorporate Designer into our forms-creation process? Is there a way to look at making this work?

Avatar

Former Community Member
Hmm, big question. You'd want to get experiance by using Designer to try to do what you are doing in your AcroForms in order to get used to the new UI and field types. The biggest thing will probably be the new scripting model which is quite different. While you can still use some of the Acrobat script objects to do some things, you'll want to convert to the XFA scripting model as much as possible if you want to have success.



You can check out the Designer Dev center here: http://partners.adobe.com/public/developer/livecycle/designer/devcenter.html . There's a link to some samples you can look at, and also a link to the XML Form Object Model document, which is extremely useful when writing script. As an example, here's what your script would like using the XFA object model. I'm just typing it into this window here, so I can't guarantee it won't have a typo or a little mistake, but should be pretty close.



var dcProceed = true;

// Get the field containers from each page.

for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {

var oFields = xfa.layout.pageContent(nPageCount, "field");

var nNodesLength = oFields.length;



for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {

if (!(this.ui.oneOfChild.className == "button") && (this.mandatory == "error") {

if (this.rawValue == null || this.rawValue == "") {

app.alert("The field with name " + dcLoopField.name + " is required. Please enter a value before submitting.", 1, 0, "Field is required");

dcProceed = false;

break;

}

}

}

}



if (dcProceed) {

var dSubmit = xfa.form.formName.resolveNode("DCSubmitFV1_0");

dSubmit.presence = "hidden";

dSubmit.execEvent("click");

//where dSubmit is a submit type button that points to your URL

}



Also, XFA forms do not use FDF, they use XML, so depending on what you are doing on the server after the submit you may need to change what's going on there too.



Anyways, the first question I would ask if I was you is why you want to switch. If you already have everything you want working and your just switching because it is the "new" way to design forms it's probably not worth it. If your looking to take advantage of functionality it can provide that AcroForms can't, or your looking to use it with the LiveCycle server products then go for it. It's a big change with a definate learning curve, but in the end I think you'll be happy.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Wow, thank you for the wealth of information Chris. You're the best. I was thinking that using Designer would be better for me becuase building and editing forms with Designer is so much easier and more flexible than is doing so with Acrobat. It's a nicer forms-building interface... MUCH nicer in my opinion. We already have a lot invested in the system that we're using and the developers of that system have informed us that Designer support is not even on the horizon, so I guess we'll have to stick with Acrobat for now. I'm disappointed, but that's the way it is for now. Thanks again for the great information and advice Chris.



-Mike