I'm wanting to but a box or even just a gray area behind to single line questions on a form to make sure I differentiate a certain question. Here is an example of what I'm hoping for:
Is there some CSS code for this?
Thanks!
I'm wanting to but a box or even just a gray area behind to single line questions on a form to make sure I differentiate a certain question. Here is an example of what I'm hoping for:
Is there some CSS code for this?
Thanks!
Hello James,
You might be able to accomplish this by putting the required fields in a collection and then removing the header and Add button using Javascript.
Below is an image containing the code and the resulting image:
where 'cf-collection-append.form-q' is the class name of the Add button and '.cf-section-header' is the class name of the header which says "Collection" by default.
Here is the code in an easier to read version.
CSS Code:
.CollectionName { border-style: solid; border-width: 5px; }
JavaScript Code:
$(document).ready(function() { $('.cf-collection-append.form-q').remove(); $('.cf-section-header').remove(); });
Since there is no specific target to customize the border for, I don think you can. Perhaps use Custom HTML and do something like this?
Forms Design:
Forms Preview:
Might need to use a section header at the top of that and then one at the bottom. Remove the text from the title/label of the sections and then apply a CSS Class name to the section header above the two fields. Then you can use that to assign a border with CSS. I do not know about having the submit button in that border though.
Thanks, guys. That might work.
Hi Winston,
That would be awesome!
I added the code you've sent but it's only removing the "Collections" title and the "Add" button.
I'm relatively new so I don't know if I'm using collections wrong or anything like that. But maybe you can tell me if the coding is right.
Modify the CSS and change CollectionName to the actual CSS class name you're using for the collection. If your collection doesn't have a CSS class name, then you can give it one first and then use that in the CSS.
Hello James,
I apologize, I forgot to also note that the .CollectionName in the CSS was the class name that I gave to my collection. Alex's solution is correct and you can assign a class name through the advance options on the Collection element.
That worked perfect! Thanks, guys!