10380 Posts in 2195 Topics by 1711 members
|Go to End||Next >|
15 July 2009 at 9:42pm
Just when you create the translated form you have to access your data base (the way depends on your host provider, here is through phpMyAdmin), note in the table UserDefinedForm the ID of the translated form, go to the EditableFormField, find the rows (a row equals a field) corresponding to the translated form and change their ParentID field to the ID noted before. That means that you will link the form fields to the page they belong to.
I hope that it applies to your problem and it helps.
15 July 2009 at 9:52pm
@Big Bang Creative re. change html for fields
Ah sorry, I did not understood. Don't take my word for granted, but I think the way Forms are displayed in SilverStripe (ie. div vs. ol) is not easily customisable through custom templates, at least it doesn't seem to be done directly with the code included in the userforms module.
Think about it: forms are everywhere from the CMS to the front-end login. They are rendered through the templates of the sapphire/templates folder and controlled by the sapphire/forms code. Dig in there if you want to modify your forms HTML structure.
16 July 2009 at 4:47am
Thanks Juanito, I'll give it try sounds like it's worth it.
16 July 2009 at 9:07am Last edited: 16 July 2009 9:07am
I tried through phpMyAdmin, but I think that I have a problem. I found the ID of the translated form under UserDefinedForm, but under EditableFormField there is no separate entry for this new form. And if I add a field on the new form it gets added to the working french, original form!!!
16 July 2009 at 9:33am
After you add those fields to the translated form, no need to panic: if you see them in the original form is because they appear in EditableFormField with ParentID being the ID of that original form. Just change ParentID of all these rows and assign the ID of the translated form.
If I got you wellâ€¦
16 July 2009 at 8:27pm Last edited: 16 July 2009 8:31pm
Ok, I got the translated English form created by changing the ParentID for every field like you said! However there one last problem. I was able to put in the data for the email recipients when I first created the translated form, but going back now to see why my form doesn't get sent anywhere the info is gone (actually it was added to the original french form) and I can't add it any more. It gives me the error "Not Found" when I click on the green plus under the "email recipients" tab.
Do I need to add that through MyphpAdmin too?
16 July 2009 at 9:50pm
I don't remember doing it myself, but if you look at the UserDefinedForm_EmailRecipient table, you'll see that the FormID field is pointing to the original form. Just replace the ID with that of the translated form and you'll be done. In my experience, once these ID fields are tightened up, you can modify the other ones through the CMS without going back to phpMyAdmin.
27 July 2009 at 1:57am
kateh, just to precise what Juanitou said, before you change the FormID to point to the translated form, copy that record and change the FormID of the copied record.
After the form fields and the email addresses are added in this way, it will work and they also show up in the CMS.
|Go to Top||Next >|