Skip to content

Conversation

bdeckerdev
Copy link

Calc element had been written to use a class that had been defined as a static "input-medium" size and it would ignore the columns (width) param. This update translates cols into bootstrap class definition to allow variable width based on cols. Also cleaned up the code to use heredoc for the HTML.

Cons: Previous, cols were ignored in bootstrap templates. Now, it will have an effect. A dev might need to adjust their cols param to suit and it's not obvious or documented that the translation points are 15, 40, and 60. If this commit is accepted, notify me and I'll update the wiki - [email protected]

Calc element had been written to use a class that had been defined as a static "input-medium" size and it would ignore the columns (width) param.  This update translates cols into bootstrap class definition to allow variable width based on cols.  Also cleaned up the code to use heredoc for the HTML.

Cons: Previous, cols were ignored in bootstrap templates.  Now, it will have an effect. A dev might need to adjust their cols param to suit and it's not obvious or documented  that the translation points are 15, 40, and 60.  If this commit is accepted, notify me and I'll update the wiki  - [email protected]
@trob
Copy link

trob commented Feb 8, 2021

I can't see a class "input-medium" in the calc element.
It's correct that a width is missing for the calc element if height is not set or 1.
The cols in the textarea are respected as long as your Joomla template doesn't set a textarea width.

But I think a modification should do it like in the field element (selection of more general input and bootstrap classes).

fabrik-element-calc-form.php is a layout file, so you can use your solution to override it on your site.
And/or you can always add custom CSS to style it.

@bdeckerdev
Copy link
Author

Thanks Troester. I'm just learning this and I'm very weak with overrides and templates so I little uncertain how to proceed. I'm going to make this a side project and use it to better learn git, CSS and the internals of Fabrik. Hopefully, I'll learn proper ways to address issues like this along the way. Appreciate your input as always. With much respect, Bruce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants