How to customize Contact Form's code?

I returned ten years later as I used Rapidweaver previously and am sad to see that, we are still forced by those double BRs and the lack of per-element CLASSes we could specify in the Contact Form’s code. (BRs are for margins, even if we don’t need that 2 × 22 px value, and without those CLASSes, I am forced to use annoying CSS tricks/workarounds for addressing specific form elements for customizing their look.)

That’s all for the fast grumbling. :slight_smile:

So, is there any way to dig into the code and reach these basic design functions (maybe into the PLIST file of it, somewhere, I couldn’t find it)? Thank you! :slight_smile:

Yep, it’s still the same 10+ years later. I don’t think this page type has received any changes in the whole of that time? I think the <br> tags are a legacy leftover from the days when RapidWeaver had to support Internet Explorer 6.

There are no hidden settings or secret property list (PLIST) files to change any of the source output for the RapidWeaver contact form. It is what it is. And there are other irritating things like labels not being attached to checkboxes etc.

Consider using this custom CSS code to nullify the line breaks and introduce your own spacing using modern viewport proportionate units of measurement:

.rw-contact-form br {
    display: none;
}

.rw-contact-form input,
.rw-contact-form textarea {
    margin-bottom: 2vw;
}


.form-checkbox-field {
    display: block;
    width: 100%;	
}

This code is taken from my knowledge base article about the RapidWeaver contact form. See ‘changing the spacing between form fields’.

If you require something more sophisticated than the contact form that ships with RapidWeaver, most stack developers have their own contact form stacks. These would obviously require the ‘Stacks’ plugin to use. Most can be found via a web search or the RapidWeaver addons marketplace.

4 Likes

Thank you, that helped a little. But I would make more customization, for example minor notes to the input elements (what to enter here etc.) and I could want them designed (smaller font size, colored differently etc.) (I can do them with compromises…)
Or even, make the whole labels clickable instead of those some-pixel input elements, e.g. at radio buttons or checkboxed, you know. This all requires changing the code but I can’t do it because they stuck in the previous decade of webdesign? Really? :frowning:

Okay, this is a retorical question, sorry. Don’t you know how to send them such a feedback? Or am I really forced to buy FormLoom (assuming that it has these basic functions)?

The HTML code cannot be edited. It comes from within RapidWeaver.

About the most you could do would be to add some jQuery Javascript to your page, which could be used to give each form field a unique class or ID selector name. I think I have some from when I was helping another user with much the same thing. I can find it and share it here if there’s interest.

Then you would be able to write CSS that targets your different form inputs with different styling. Like this:

.input1 {
	font-size: 12px;
}

.input2 { 	
        background-color: aliceblue;
	color: red;
	font-weight: bold; 
}

input3 {
	border: 2px solid red;
}

For help text after the form inputs, you could possibly do this using the CSS content property, on an :after pseudo selector. I have not tested this, so cannot be sure. But that is what I would try first, in combination with the little jQuery function.

Sadly what you’ll come to realise after an absence of 10 years is that the core app (RapidWeaver) has not moved on a great deal. Instead it has been the third-party addon developers who’ve battled on to try and bring some of the functionality users ask for. I think I would be justified in saying that @isaiah’s Stacks plugin is the only reason we’re all still here!

Stacks like FormLoom and FormsPlus probably will give you much more flexibility. Although you would have to find free demo versions to test or find out what the refund policy is, if you buy one that doesn’t do what you want. Both seem to offer a significant upgrade over the contact form page plugin supplied in RapidWeaver. And there are many other form stacks out there.

A separate product called MachForm also gets a lot of positive feedback on these forums. A little more pricey in comparison. However once you own it, you can use the generated forms in any number of websites and with any publishing platform, not just RapidWeaver. And I hear their support is really good.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.