Hi there,
I was just wondering if anyone had any ideas as to how I could achieve something?
At the moment I have an SAEF working and it is using the File extension to allow me to upload a file along with the weblog entry.
The problem I have is that the File extension doesn’t get rid of spaces in file names so I am having problems using the URL that is placed into the weblog. I tried using Extract URL on it but this won’t work.
What I would therefore like to do as I don’t want people to upload any files with spaces in anyway as to me that is a big no no is use some javascript validation on the field and not allow the form to be sent if that field has any spaces contained in it.
I took a look at the Live Validation Javascript available on the web which I am actually using on the form anyway but don’t know if it is possible to write a regular expression to check for this sort of thing.
My problem here is two-fold really. I am pretty sure that you can use regular expressions to achieve this kind of thing as the Live Validation documents say you can but then the second part is that I have absolutely no knowledge of how to write regular expressions. I have read pages and pages about them but just cannot get my head around them at all.
So to my question which is simply, can a regular expression be written to check that there aren’t any spaces in a certain field in a form on an SAEF and will this work with the Live Validation script?
Sorry for all the questions but any help with this would be massively appreciated.
Best wishes,
Mark