Is it possible to get the Configuration Name instead?
It's possible, but not readily supported at the moment. For now, if you want to get the configured form information, you can see how the converter is currently doing that here:
// The persistence object responsible for access to configured forms.
private IConfiguredFormPersistence ConfiguredForms { get; set; }
/* ... */
// Get the current configured form persistence object.
ConfiguredForms = ConfiguredFormPersistence.Current.Manager;
/* ... */
// Get information about the configured form.
var conForm = guid.HasValue ? ConfiguredForms.Retrieve(guid.Value) : null;
That conForm variable has a Name property on it, which is what you're looking for.
If you'd prefer it be more built-in, we can chat about having you submit a pull request to include the configured form name (we'd have to figure out the best way of going about that).
Form Name in Controller
I think I've found where to add Analytics to the event on a successful submission but I'm not sure how to reference the name of the form.
Assuming you have a
vm
variable like in this code sample: http://www.formulate.rocks/render-formThen you can get the form name from this C# property:
Then you can output the name of the form into the JavaScript string you are referencing. You may have to do a bit of string escaping.
So simple. Thank you.
Sometimes I overlook what's staring me in the face.
Is it possible to get the Configuration Name instead?
Does
vm
contain that too?Thank you.
It's possible, but not readily supported at the moment. For now, if you want to get the configured form information, you can see how the converter is currently doing that here:
https://github.com/rhythmagency/formulate/blob/2c6b8328e1aae1ebdbe690ee5469ef1003a0ba8e/src/formulate.app/Converters/ConfiguredFormConverter.cs#L83
That
conForm
variable has aName
property on it, which is what you're looking for.If you'd prefer it be more built-in, we can chat about having you submit a pull request to include the configured form name (we'd have to figure out the best way of going about that).
is working on a reply...