We have paid an agency to develop some responsive templates including a nicely styled HTML form for booking events which also includes JQuery client side validation.
Whilst I've created a Custom Form with the same fields in Matrix and have adapted the validation rules etc. I can't get the form to look precisely the way I want it to.
So myu question is "Is it possible to post from a standard HTML form to the 'action' of the Custom Form" i.e.
<form action="./?a=[assetID of custom form]" method="post">
Sure, you could do that as long as you include all the correct POST values that the form is expecting. But, I wouldn't recommend you do this since it would be a huge pain to update, change, etc.
You say you can't get the form to look how you want. What is missing? What are you not able to do?
I agree with Nic its not ideal, but you certainly can. I've done something similar with posting to an asset builder to replace its HTML UI with something more sophisticated. You can use Firebug (or IE F12) or a lower level network tool like fiddler to snoop on the exact POST syntax to make sure you duplicate it properly.
Turns out it was just me being dopey and expecting to be able to set the ID of the Matrix custom form so it matched the class in my supplied CSS...
Now I've had a coffee I appreciate there are at least several good reasons why Matrix needs to control the form ID, so have updated my CSS to reference the form ID generated by Matrix and it looks exactly as it should.
It's useful to know that I can post directly though, should the need ever arise.
Moving from one numpty admission possibly onto another, is there a option to set a CSS class for the form, and avoid having to add an ID to the CSS every time I create a new form? I appreciate having a "Form extras" option to inject code could cause conflicts with names and IDs which is probably why it's not there as a Simple Formatting option, but not sure if there's another way around this?
Moving from one numpty admission possibly onto another, is there a option to set a CSS class for the form, and avoid having to add an ID to the CSS every time I create a new form? I appreciate having a "Form extras" option to inject code could cause conflicts with names and IDs which is probably why it's not there as a Simple Formatting option, but not sure if there's another way around this?
No, there is no option for this. Most likely for the reason you stated.
I always just use javascript to add it. Quite simple and quick that way.