Welcome, Guest
  • Page:
  • 1
  • 2

TOPIC: breezing for database help needed please

Re: breezing for database help needed please 2 years 11 months ago #67205

  • TheMuffinMan
  • TheMuffinMan's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 6524
  • Thank you received: 432
  • Karma: 100
Hi,

maybe this will help. It is for backend views of records but can easily be turned in frontend views, by selection "display: both" in the view setup:

crosstec.de/en/forums/37-contentbuilder-...mit=6&start=12#62375

Regards,
Markus
===============================================
Satisfied?
Consider a membership!
===============================================
Like us on Facebook
===============================================
Follow us on Twitter
===============================================
The administrator has disabled public write access.

Re: breezing for database help needed please 2 years 11 months ago #67235

  • hotbullet
  • hotbullet's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
TheMuffinMan wrote:
Hi,

maybe this will help. It is for backend views of records but can easily be turned in frontend views, by selection "display: both" in the view setup:

crosstec.de/en/forums/37-contentbuilder-...mit=6&start=12#62375

Regards,
Markus

will try tonight,, TheMuffinMan... if i share with you my logins can you do for me please?
The administrator has disabled public write access.

Re: breezing for database help needed please 2 years 11 months ago #67293

  • Richper
  • Richper's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 41
  • Karma: 1
There is a sample with all the coding but I can't remember which it is. The proceduire is something like the following;

- Go into your backend
- Open Breezingforms/manageforms
- Go to Create form with Classic Mode
- Name your form and establish width according to the amount of columns you have and save.
- Create a title (text/html) going to the top button "New" and selecting "Text"
- Next create a query list going to the top button "New" and selecting "Query List"
- Give the query list a title and name
- leave the CSS class'es as are for now, later I can give you a CSS that will highlight the appearance of your table.
- Fill in the other fields according to your need.
- In that same view find the "Query" tab at the top, and put in a code similar to the following, obviously according to your own data, your own joins, etc.:
$rows = ff_select(
"select ".
"c.id as id, ".
"c.userid as userid, ".
"u.name as user, ".
"c.titoferta as titoferta, ".
"c.tipocuenta as tipocuenta, ".
"c.razonsoc as razonsoc, ".
"c.rut as rut, ".
"c.contacto as contacto, ".
"c.fonofijo1 as fonofijo1, ".
"c.email1 as email1, ".
"c.ciudad as ciudad, ".
"c.hoydate as hoydate, ".
"c.cierre as cierre, ".
"c.areaserv as areaserv, ".
"c.tiposerv as tiposerv, ".
"c.otros as otros, ".
"q.perfil as perfil, ".
"c.descr as descr ".
"from #__ofertas as c ".
"left join #__users as u on c.userid = u.id ".
"left join #__regcompr as q on c.userid = q.userid ".
"order by areaserv, hoydate, ciudad"

);

- Open the next Tab that is "Columns".
- Define the title of the column (visible on your table). Register the Data/name ( the field in your database that should bring out the data you want to show).
- In the "Value" fiels put: <?php return $value; ?>
- Save the Query List

- If I remember well you should create at least two more fields, hidden fields:
- Delete ID name: deleteid save with no data, values or anything.
- User ID name: userid copy this in the value field: <?php return JFactory::getUser()->get('id',0) ?> and save

- I remember the sample had two buttons "Reset" and "Modify" but as I didn't need them I created them but left them unpublished:
- Reset name: revoke
Image URL: {mossite}/administrator/images/delete.png
Mouseover Image URL: {mossite}/administrator/images/delete_f2.png
Caption: <font size="2"><strong>Borrar Registros</strong></font> (or your own caption)

revoke: Script / Custom / Click
function ff_revoke_action(element, action)
{
// check if user is logged in
var userid = ff_getElementByName('userid').value;
if (userid == 0) {
alert('Usted no ha ingresado al sitio.');
return;
} // if

// search if userid is in the list
var listid = ff_getIdByName('trabajos');
var qrows = ff_queryRows[listid];
var cnt = qrows.length;
var i;
var rowid = 0;
for (i = 0; i < cnt; i++)
if (qrows[1] == userid) {
rowid = qrows[0];
break;
} // if
if (rowid == 0) {
alert('Usted no está registrado.');
return;
} // if

if (!confirm('¿Realmente quiere cancelar su registro?')) return;
ff_getElementByName('deleteid').value = rowid;
ff_submitForm();
} // ff_revoke_action


- Modify name: update
Image URL: {mossite}/administrator/images/edit.png
Mouseover Image URL: {mossite}/administrator/images/edit_f2.png
Caption: <font size="2"><strong>Modificar Datos</strong></font>

update Script /custom / click
function ff_update_action(element, action)
{
ff_redirectParent(
'<?php return ff_makeFormUrl("ofertas"); ?>'
);
} // ff_update_action

Obviously you have to change the names of fields, tables, etc. (sorry the spanish)

And, if I remember well, thats about it. If you have data in your database table, and you have put in the coding correctly you should see in the right side of your form creator the table and the data.

if I have missed something out I'll try to help you finish it. In any case go through the breezingforms samples, I'm sure I got this out of there.
The administrator has disabled public write access.

Re: breezing for database help needed please 2 years 11 months ago #67299

  • hotbullet
  • hotbullet's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
Richper wrote:
There is a sample with all the coding but I can't remember which it is. The proceduire is something like the following;

- Go into your backend
- Open Breezingforms/manageforms
- Go to Create form with Classic Mode
- Name your form and establish width according to the amount of columns you have and save.
- Create a title (text/html) going to the top button "New" and selecting "Text"
- Next create a query list going to the top button "New" and selecting "Query List"
- Give the query list a title and name
- leave the CSS class'es as are for now, later I can give you a CSS that will highlight the appearance of your table.
- Fill in the other fields according to your need.
- In that same view find the "Query" tab at the top, and put in a code similar to the following, obviously according to your own data, your own joins, etc.:
$rows = ff_select(
"select ".
"c.id as id, ".
"c.userid as userid, ".
"u.name as user, ".
"c.titoferta as titoferta, ".
"c.tipocuenta as tipocuenta, ".
"c.razonsoc as razonsoc, ".
"c.rut as rut, ".
"c.contacto as contacto, ".
"c.fonofijo1 as fonofijo1, ".
"c.email1 as email1, ".
"c.ciudad as ciudad, ".
"c.hoydate as hoydate, ".
"c.cierre as cierre, ".
"c.areaserv as areaserv, ".
"c.tiposerv as tiposerv, ".
"c.otros as otros, ".
"q.perfil as perfil, ".
"c.descr as descr ".
"from #__ofertas as c ".
"left join #__users as u on c.userid = u.id ".
"left join #__regcompr as q on c.userid = q.userid ".
"order by areaserv, hoydate, ciudad"

);

- Open the next Tab that is "Columns".
- Define the title of the column (visible on your table). Register the Data/name ( the field in your database that should bring out the data you want to show).
- In the "Value" fiels put: <?php return $value; ?>
- Save the Query List

- If I remember well you should create at least two more fields, hidden fields:
- Delete ID name: deleteid save with no data, values or anything.
- User ID name: userid copy this in the value field: <?php return JFactory::getUser()->get('id',0) ?> and save

- I remember the sample had two buttons "Reset" and "Modify" but as I didn't need them I created them but left them unpublished:
- Reset name: revoke
Image URL: {mossite}/administrator/images/delete.png
Mouseover Image URL: {mossite}/administrator/images/delete_f2.png
Caption: <font size="2"><strong>Borrar Registros</strong></font> (or your own caption)

revoke: Script / Custom / Click
function ff_revoke_action(element, action)
{
// check if user is logged in
var userid = ff_getElementByName('userid').value;
if (userid == 0) {
alert('Usted no ha ingresado al sitio.');
return;
} // if

// search if userid is in the list
var listid = ff_getIdByName('trabajos');
var qrows = ff_queryRows[listid];
var cnt = qrows.length;
var i;
var rowid = 0;
for (i = 0; i < cnt; i++)
if (qrows[1] == userid) {
rowid = qrows[0];
break;
} // if
if (rowid == 0) {
alert('Usted no está registrado.');
return;
} // if

if (!confirm('¿Realmente quiere cancelar su registro?')) return;
ff_getElementByName('deleteid').value = rowid;
ff_submitForm();
} // ff_revoke_action


- Modify name: update
Image URL: {mossite}/administrator/images/edit.png
Mouseover Image URL: {mossite}/administrator/images/edit_f2.png
Caption: <font size="2"><strong>Modificar Datos</strong></font>

update Script /custom / click
function ff_update_action(element, action)
{
ff_redirectParent(
'<?php return ff_makeFormUrl("ofertas"); ?>'
);
} // ff_update_action

Obviously you have to change the names of fields, tables, etc. (sorry the spanish)

And, if I remember well, thats about it. If you have data in your database table, and you have put in the coding correctly you should see in the right side of your form creator the table and the data.

if I have missed something out I'll try to help you finish it. In any case go through the breezingforms samples, I'm sure I got this out of there.

Hi Richper,

Thanks,, i am thinking that i might be using the cck instead. what do you think? here is the form,
test.ocstation.com/index.php?option=com_...view=edit&Itemid=220

and for the out put. .
test.ocstation.com/index.php?option=com_...list&id=3&Itemid=221

but i don't how to format the output.
The administrator has disabled public write access.

Re: breezing for database help needed please 2 years 11 months ago #67308

  • Richper
  • Richper's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 41
  • Karma: 1
I believe the important thing is to get to Rome, not what vehicle you use. I have never used Content Builder and I don't know what cck is.
If they work for you great. I believe that is what matters.
My system is code dependent, the other systems seem to be more friendly to newcomers. I like to know what is behind the scenes so if anything goes wrong or needs improvements I can do it myself.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.084 seconds

Lifetime Subscription

Get lifetime access to all of our current and future products and 2 years of professional support -- for just $169 USD.

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, WordPress® plugins, Joomla!® templates   this means, by purchasing a Lifetime Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our 1-Year or Lifetime Subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.de with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Supporting the Joomla! Community

Offical Joomla! User Groups and organizers of Joomla! Days, registered at Joomla.org, are supported by Crosstec, worldwide!

If you are running a JUG or organize a Joomla! Day and you need any of our products, just write an email to info@crosstec.de and you'll get a Lifetime Membership for free!

Live Chat Software