Formbuilder - createServiceUrl('form', 'create') and unwanted #contentkey in title


We are using enonic 4.7.11 and have a small annoyance with the createServviceUrl(‘form’, ‘create’) function.
It works fine in terms of storing the form and creating the email, but sadly it also append the contentkey in the title of the email.
Is there any way to prevent this from happening?

  <form action="{portal:createServicesUrl('form', 'create', portal:createPageUrl(portal:getPageKey(), ('success', 'create')), ())}" class="enonic-form" enctype="multipart/form-data" method="post">


Just to get started, which formbuilder.xsl source are you using? Could you see if it is this one?

Its a minor modified version for styling purposes, changing some classes around. Other then that, its the same.

Hi lt4!

In the Java source-code, we have the following lines, to compose the title of the e-mail:

    String subject = XMLTool.getElementText( XMLTool.getElement( receipt, "subject" ) );
    if ( contentReference > 0 )
        subject += " #" + contentReference;

So, there is no way you can control this from XSLT. This is part of how the product works. The code have been like this since before 2011. We have no history on why it was made like this, but it is probably very useful for many, to have the reference to the e-mail when looking it up.

1 Like