Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

MultiForm Module: FileField and PhoneNumberField


Go to End


3 Posts   1402 Views

Avatar
katja

Community Member, 46 Posts

11 November 2010 at 2:29am

Edited: 11/11/2010 2:30am

Hello,

First of all, I think the multiform module is brilliant. I'd just be interested to know, is it possible to get formfields of type "FileField" or "PhoneNumberField" working, when they are not part of the last step? It seems that the data cannot be loaded into the session. The entries are lost when you go to the next step. Does that have to do with the fact they are arrays?

Would be glad to hear about any ideas on this.

Thanks,
Katja

Avatar
Willr

Forum Moderator, 5523 Posts

11 November 2010 at 5:45pm

Phone Number Field should be able to load data for which it saves, sounds like a bug though it would be more related to how Phone Number Field works rather than multiform (hopefully).

With FileField you won't be able to get that to work as you cannot set the value of a file upload form upon returning (for obvious security reasons!) so you'll have to live with users having to reattach the file.

Avatar
katja

Community Member, 46 Posts

12 November 2010 at 10:37pm

Thanks very much for this, Will. You are right about the phone number field, I have now found out that it does get saved if you leave no spaces between the numbers. The separate phone number fields are each numeric fields, but they don't get validated I think. If you leave spaces the script turning the parts into one string is not working and the number won't get saved. So, yeah, nothing to do with the multiform module. About the image, that makes sense. I have just put it on the last step now, as users might otherwise not notice they have to attach it again.

Katja