Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Tweak document form as opposed to customize View modes: 
User avatar
Member
Member
dcollins-marketwired - 2/11/2014 9:28:52 AM
   
Tweak document form as opposed to customize
I want to add a little bit of whitespace to the entry form for my doctype.

I've got a calendar picker and a text field, and i want my users to choose between them. So this is what I'm thinkin':
Other field 1: [  ]
Other field 2: [ ]

Pick a Date: [Calendar picker]
-OR-
Paste a Date String: [Text]

Other field 3: [ ]
Other field 4: [ ]

I know I can make a custom layout, but it starts from scratch or from a table, so that is a LOT of work to recreate the default form. Too much work.

So, Here's what I'm trying to do.

1. Create a field of type 'Label', and set its caption to -OR-.
2. Add some padding above 'Pick a Date:', and some padding below 'Paste a Date String:'

1. works great, 2. does not. I am unable to leverage any of the 'CSS styles' settings in the field setup. 'Caption style', 'Input style', and 'Control CSS Class' have no effect as far as I can tell. None of them add or alter any styling on those fields.

User avatar
Member
Member
Shmar - 2/11/2014 9:42:45 AM
   
RE:Tweak document form as opposed to customize
In the caption textbox add some inline styling.

Example:
<br /><b>-OR-</b><br />

User avatar
Member
Member
dcollins-marketwired - 2/11/2014 9:56:46 AM
   
RE:Tweak document form as opposed to customize
Shmar wrote: In the caption textbox add some inline styling.

Example:
<br /><b>-OR-</b><br />

Thanks but you misunderstand.

Step 1 (to prompt between them) I've got.
Step 2 (whitespace) is supposed to go above the top field as well as below the bottom field - to set them off from all the other fields.

User avatar
Member
Member
Shmar - 2/11/2014 10:16:25 AM
   
RE:Tweak document form as opposed to customize
so do this:

in the caption for " 'Pick a Date:"
do this: "<br /><br /> 'Pick a Date:"


and for the other one: "<br /><br/ >Other field 3:"

User avatar
Member
Member
dcollins-marketwired - 2/11/2014 10:24:37 AM
   
RE:Tweak document form as opposed to customize
Shmar wrote: so do this:

in the caption for " 'Pick a Date:"
do this: "<br /><br /> 'Pick a Date:"

and for the other one: "<br /><br/ >Other field 3:"

Nope. Pushes caption down but not field. Makes it look wonky.

User avatar
Member
Member
Shmar - 2/11/2014 10:27:57 AM
   
RE:Tweak document form as opposed to customize
so add a dummy field where you want the spaces. make it a label

User avatar
Member
Member
dcollins-marketwired - 2/11/2014 10:41:51 AM
   
RE:Tweak document form as opposed to customize
Yes, but labels cannot be empty, and you still get the ':' But yes, that is what I have been experimenting with.

Aha! Got it!

I can add a label but set the caption style to visibility: hidden; Now the row takes up space, but you cannot see the caption.

So:

Column name: sep1
Type: text
Size: 6
Caption: & nbsp ; (I guess this could be anything)
Control: Label
Caption style: visibility:hidden;

Thanks!

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 2/11/2014 7:14:11 PM
   
RE:Tweak document form as opposed to customize
No need to use a hack for the label, just create a custom form to display only the input boxes and not the labels. OR you could use CSS to modify the display and visibility. Kentico by default, applies a CssClass to nearly every possible attribute you can think of. All you need to do is create the style to go with it.

User avatar
Member
Member
dcollins-marketwired - 2/12/2014 9:02:06 AM
   
RE:Tweak document form as opposed to customize
FroggEye wrote: No need to use a hack for the label, just create a custom form to display only the input boxes and not the labels.

The problem with this is, as I mentioned, creating a custom form is not trivial. You have to create it from scratch. I looked into the code that produces my form. It's got to be a hundred lines. (the calendar-picker is prohibitive). I've posted a suggestion to Kentico that it would be great if there could be an option to start from the existing default form markup.

FroggEye wrote: OR you could use CSS to modify the display and visibility. Kentico by default, applies a CssClass to nearly every possible attribute you can think of. All you need to do is create the style to go with it.

Yes. I have been having some difficulty identifying what classes Kentico assigns to elements, or which elements it decides to assign them to. But I've managed to get it working now.