Jump to:

10930 Posts in 2613 Topics by 1810 members

All other Modules

SilverStripe Forums » All other Modules » UserForms 0.2

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Go to End
Author Topic: 26945 Views
  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: UserForms 0.2 Link to this post

    @Kateh

    Hi!

    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.

    Best regards,
    Juan

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: UserForms 0.2 Link to this post

    @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.

    Best regards,
    Juan

  • kateh
    Avatar
    Community Member
    18 Posts

    Re: UserForms 0.2 Link to this post

    Thanks Juanito, I'll give it try sounds like it's worth it.

  • kateh
    Avatar
    Community Member
    18 Posts

    Re: UserForms 0.2 Link to this post

    @Juanitou
    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!!!

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: UserForms 0.2 Link to this post

    Hi Kateh,

    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…
    Juan

  • kateh
    Avatar
    Community Member
    18 Posts

    Re: UserForms 0.2 Link to this post

    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?

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: UserForms 0.2 Link to this post

    Hi Kateh,

    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.

    Good luck,
    Juan

  • Kalileo
    Avatar
    Community Member
    127 Posts

    Re: UserForms 0.2 Link to this post

    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.

    26945 Views
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.