I'm using ChronoConnectivity 4.0 RC3.2 to display a simple form using the Front End List setting and selecting Auto Listing = Yes option. Is there somewhere I can put a command on that page that will change the output setting of my date? My start-date is outputting 1981-00-01 00:00:00 and I would like it to simply say 1981.
If I can't do this. Can you give me the code for doing it in the Custom Listing Settings tab?
If I can't do this. Can you give me the code for doing it in the Custom Listing Settings tab?
Hi dbain,
Do you have a form connected to your connection ? if you have one then you can use the "Auto list row" to edit the row data before its printed using this code in a "Custom code" action:
Regards,
Max
Do you have a form connected to your connection ? if you have one then you can use the "Auto list row" to edit the row data before its printed using this code in a "Custom code" action:
<?php
$form->data['row']['date'] = date('Y', strtotime($form->data['row']['date']));
?>
Regards,
Max
So here is what I did based on what I think you told me. I created a form using Form Wizard. Dragged Custom Code from Core Actions. Configured it and added the following code:
<?php
$form->data['row']['date'] = date('Y', strtotime($form->data['row']['date']));
?>
Set the Mode to "Controller" and saved the form.
Then I went into my Connection under Front End Listing and put the name of my form in the bottom of the General tab where it says Auto List Row Event.
I then saved my connection. Dates till came out the way they had before. I must have done something wrong.
<?php
$form->data['row']['date'] = date('Y', strtotime($form->data['row']['date']));
?>
Set the Mode to "Controller" and saved the form.
Then I went into my Connection under Front End Listing and put the name of my form in the bottom of the General tab where it says Auto List Row Event.
I then saved my connection. Dates till came out the way they had before. I must have done something wrong.
Sorry for not responding sooner!
Wrong, you should place the event name here (the one created in your form under the "on submit"), form name should be select under the "Admin Editing" or "Frontend Editing" tabs in the connection.
Regards,
Max
and put the name of my form in the bottom of the General tab where it says Auto List Row Event.
Wrong, you should place the event name here (the one created in your form under the "on submit"), form name should be select under the "Admin Editing" or "Frontend Editing" tabs in the connection.
Regards,
Max
This topic is locked and no more replies can be posted.