Custom Form Creation

I need to create a custom form that lets users specify products that they may be already using for analysis purposes. The 'Ingredients" field needs to be pre-emptive just like a search field that provides a list of possible options for the user to choose from.

The + and - buttons are there for users to add more items or subtract an item. When the send button is pressed, the information needs to be sent as an email.

@Jerry @Malachiman @Norm @Whittfield - input and help from you will be appreciated.

Basically, you want to have a storefront or a fancy contact form script. My 2 cents on an affordable solution: here and here

2 Likes

I agree with Jerry; I think the best results can be made with a nice form script. https://easyforms.dev might be a great choice too…

2 Likes

For a custom form as per what I have indicated in my initial post, would I have to learn HTML5, CSS3 and Javascript?

Hey @Samazar

That’s something you would likely have to build from scratch. Not impossible, but yes you would need to code it.

This is really beyond the scope of support you get in the forum.

1 Like

Thanks Pete, that is encouraging. I used to be very good in programming when I was at college. I was awarded for best software and interface design in my final practical exams not to mention that I also earned a special mention for the fastest records sorting algorithm :blush:. Unfortunately and regrettably, I never pursued software development further and have forgotten those skills.

I did a similar form with multiple sets of fields that are hidden and made visible when the user presses + to add more than one person. However, the email is received successfully but not very presentable due to the fact that field name prefixes and plan fields are included, e.g:-

Input_2354: Joe Blog
Input_2769: Male
Input_2316: 40
Input_213: Mary Poppins
Input_3452: Female
Input_845: 28
Input_223:
Input_3552:
Input_855:
Input_283:
Input_1452:
Input_885:
Input_216:
Input_3492:
Input_895:

Is there a way to filter out the field names and replace them with more meaningful information in a presentable format where blank fields are ommited e.g:-

Person 1
Name: Joe Blog
Gender: Male
Age: 40

Person 2
Name: Mary Poppins
Gender: Female
Age: 28

I know I have introduced headings (Person 1 and Person 2) but those don’t have to be there. As long as there is one line space between each set of information.

Any help will be appreciated.

Just change the ID of the input field to create customised field names.

1 Like

Hi @Jerry - thank you for your input, that is exactly what I did and it is definitely much better. Furthermore, made some basic tweaks to the PHP code to enable better email formatting.

Hi @Norm - not sure if you’ll see this post but we really need a more flexible and sophisticated forms generating tool in Blocs. Filled-in forms once sent should be highly presentable with an option to incorporate field information in simple tables.

As you have realised, the layout of the email is done in PHP. To be able to style this would require an entire interface. If that ever gets implemented, it would only be part of a major release I would imagine.

For now more complicated forms are best handled by third party scripts or they have to be coded. As I mentioned in one of your previous posts, the way you were going to implement your form would produce results that were not great for a client, as it would email all the hidden fields also.

One method Ive used for a client form that had user added fields, was the fields populated an array, which was then easily passed to the form handler as one value. I then could “unpack” that array in the email that was generated.

1 Like

You were right Pete and I realised it when I saw the email itself, it was not presentable at all. Had to change the field IDs and make changes to the PHP code to get it right.

I know it’s easier said than done but I hope Norm looks into this further. Alternatively, an experienced coder like yourself and others on the forum could build a bric :slight_smile:

You wouldn’t be able to create the php file, which is required to handle the email. Not in the way your suggesting anyway.

You’re a better judge of that than I am. What I would like is for the email to be presented in a way that is organised and easy to follow. It would be nice to be able to preview the results of a filled-out form.

A simple spreadsheet like end-result would be nice. As I mentioned, I know it’s easier said than done.

Google forms is something I used a while back. My client bought into it and they gave me an embed code. The form looked great and they had a full list of results and gave them so many options.

1 Like

Thanks for sharing that @AdieJAM - I will google it and read more about it. Is it easy to work with?

The issue I have with external solutions is styling, I would need the form to look as if it is part of the page and not an afterthought or external solution, I know all form elements can be stylised but I am not coder although I’m sort of beginning to learn thanks to Blocs.

Well the company I did the website for do a lot in google and they collaborate all their forms and questionnaires in google and they sent me the embed code - but I have had a play around with it. I like it, yes I agree its not as smooth looking as one done in Blocs - but to collaborate questions, answers and all in one place its brilliant. I have had to fill some of their forms on various websites over the years and all looked nice.

I remember they tailored it to match the website as their is a way to edit the code too i belive if you want to change things.

Good luck !

1 Like