Forums

Complex Form Fields

mikezf 22 Mar, 2017
Hi Max,
I'm back to train further the CCv6. No I would like to build a complex Form with fields.
My question is how to do the followings, if it possible:
1. Group fields into one framed container (container with frame and title would be perfect).
(hint: multiply field is always one row only )
2. Form divided in two or more columns.
(hint: the trick with class="ui two column stackable grid container" doesn't work.
Thanks in advance,
Mike
Max_admin 24 Mar, 2017
Hi Mike,

Some of these features are integrated in Chronoforms v6, which you can call inside your connection (with the new update of course).

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 24 Mar, 2017
Hi Max,

"Chronoforms v6" ? I cannot find v6 of Chronoforms. Maybe you understand under "new update" this upcomming new version?

I found myself the following solution:
- I use the Semancic UI

<div class="ui two column stackable grid container segment">
  <div class="column">
    {view:view_form_fields_left}
  </div>
  <div class="column">
    {view:view_form_fields_right}
  </div>
</div>


but with one overwrite in original semantic ui CSS:
.ui[class*="two column"].grid>.column:not(.row), .ui[class*="two column"].grid>.row>.column {
width: calc(50% - 2px) !important;
}
I had to subtract 2px from the width of container to keep both columns in one row.
Witout that the second column skipped always one row below.
Bug in Semantic UI or there is something with the template i use.

Regards,
Mike
Max_admin 24 Mar, 2017
Good solution, but you should not edit the semantic css, just override it, and if its your template CSS then just override that.

What about this code:

<div class="ui container segment">
<div class="ui two column stackable grid">
<div class="row">
<div class="column">
{view:view_form_fields_left}
</div>
<div class="column">
{view:view_form_fields_right}
</div>
</div>
</div>
</div>
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 24 Mar, 2017
Of course i put it in the custom.css in the template.

And what about the CFv6, if it was not a mistake?

Mike
Max_admin 24 Mar, 2017
Hi Mike,

Chronoforms v6 should be available for public download this weekend if everything goes as expected.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 27 Mar, 2017
Hi Max,
that is great information.
But staying by CCv6 is it possible to controll the fields parameter like "Extra attributes".
I use it for makeing fields read only by setting "readonly=""" in Extra attributes. This is obviously statically.
But if I want to set it dynamically by unsetting "readonly", how can I do it without to generate an extra form that for?
I think about defining a Function to setting fileld attributes and calling it bevore View.

Regards,
Mike
Max_admin 27 Mar, 2017
Hi Mike,

You can call a function in the extra attributes box:

{fn:get_read_only_status}

And in the "get_read_only_status" PHP function:

echo "readonly";

and use any code you want to control this.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 27 Mar, 2017
Thanks for your advice but it do not want to work. Firebug shows in the input field the source string "{fn:get_read_only_status}" and not the PHP function result "echo readonly;" (as example).
Mike
Max_admin 27 Mar, 2017
Hi Mike,

Correct, this required a code fix to work, I can send you the patch file if you send me a message using the "contact us" page, or you can wait for the next official update.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 27 Mar, 2017
Hi Max,
message sent.
I admire how many wonderful hidden functionality includes CCv6. Respects.
Thanks in advance,
Mike
Max_admin 27 Mar, 2017
Hi Mike,

I have sent the patch file!

I'm glad you like the extension!🙂

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 27 Mar, 2017
Max, it is working.
echo "readonly;" gives readonly="readonly" (?)
echo "readonly: " gives readonly=" " (ok)
Is that correct?

Regards,
Mike
Max_admin 27 Mar, 2017
Hi Mike,

It should be
echo "readonly";
for correct php syntax, the html output can be anything, it will just work.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 27 Mar, 2017
Sorry. Of course it should be
echo "readonly";
and it generates
readonly="readonly"

Max, as you see I'm not so good in PHP.
Now I want to use a PHP variable $read_only_status and use it as folowed:

if (isset($read_only_status) && $read_only_status) {
echo "readonly";
}

Is there any way to set this variable in any other CCv6 function bevore the form view is called?
I tried globals but it seems not working.

Regards,
Mike
Max_admin 28 Mar, 2017
Hi Mike,

Where are you getting this variable from ? I mean how do you want to decide if the field is read only or not ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 28 Mar, 2017
Hi Max,

my idea is as followed.
I want to show some data to the users only for view purpose - means read only.
And after cklick on "Edit" button some fields should change their status from read only to regular.
This status could be changed with the Function "set_read_only_status" and "unset_read_only_status"
as the first command from Events "view" and "edit". These functions should change the global variable
"read_only_status" to TRUE or FALSE. The function 'get_read_only_status" will change the extra parameters
of the selected fields depending on the value of the variable "read_only_status".
Maybe there is an easier way to do this but this should be working.

As with the "readonly" token one can do this with all other as well.

Regards,
Mike
Max_admin 28 Mar, 2017
Hi Mike,

So you change this based on the event loaded, in this case you just need to change the code in the php function:

if($this->data("event") != "edit"){
echo "readonly";
}

this means that if the event loaded is not the "edit" event then print the "readonly" word and so the field will be readonly!

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 28 Mar, 2017
Hi Max,
I knew there were plenty of hidden opportunities in CCv6.
Thank you Max.

Regards,
Mike
Max_admin 28 Mar, 2017
Answer
Hi Mike,

No problems, its also still new and not enough docs or forum topics are available.

Things should get better with the release of Chronoforms 6 because it also has the same code base.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 25 Apr, 2017
Hi Max,
after there is a possibility to call a Chronoform from a Connectivity what would you recommend more:
to use FormFileds from CC or Form from CF? Pros, cons, further development?
I do not know now how to proceed .

Best regards,
Mike
Max_admin 25 Apr, 2017
Hi Mike,

If you need advanced features with your fields then use Chronoforms and call a section inside the form view of your connection, but if you need some simple fields or a search/filter field..etc then use the built in fields view.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 25 Apr, 2017
Understand, thx.
After some simple tests I lean toward Connectivity version. There is more freedom and I think more possibilities to use the Semantic UI. The only difference for me is missing of the field events actions. Maybe there is a simple
PHP / JS code to replace that in CC.

Regards,
Mike
Max_admin 25 Apr, 2017
Hi Mike,

What are the field events actions ? where you show/hide other fields..etc ? Connectivity has this feature already, but it does not have all the options in Chronoforms.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 25 Apr, 2017
OK. Then how to hide/show other fields when the event field is eq. not empty?
How to define this?
Regards,
Mike
Max_admin 25 Apr, 2017
Hi Mike,

The text field events is not available in Connectivity, but other fields events are there, like checkboxes and dropdwon, you can use the available events or do it using JS code in a custom JS view, enable the "add inside dom ready event" setting in the JS view and use the code below as an example:

$("#field_id").on("change click", function(){
$("field2").show(); //or hide()
});


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mikezf 26 Apr, 2017
Of course it is working. Just most simple.
Thank you Max.

Mike
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger