Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

Working on Drupal 7.54

I am more a site builder than a developer but now I have no choice, I need to write a little module for Drupal 7.

So, I was wondering if someone could help me to write this custom module (at least help me to start).

Here is my problem :

I need to send form values to an external database.

For the moment, I managed to tell Drupal that it will need another database (in settings.php, everything is fine here).

Following "http"https://drupal.stackexchange.com/questions/186301/inserting-data-to-external-database?lq=1 ", I managed to create a little form to add a new line in the external database (using hook_form, hook_form_submit, db_set_active and db_insert).

Now I would like to complete this custom module to achieve this :

  • an user open the node edit form
  • an user submits changes
  • the form is submitted
  • the form values are saved as usual on Drupal database
  • AND the same values are saved on the external database

Finally, I need a module to synchronize Drupal nodes with external database tables.

I suppose this is something totally doable and easy for someone used to Drupal API. Thanks in advance for any help on this.

PS : you may find a first brainstorming on this problem here : How do I edit an external database from the UI?How do I edit an external database from the UI?

Related questions

How to define and use an external database connection in a custom moduleHow to define and use an external database connection in a custom module

Working on Drupal 7.54

I am more a site builder than a developer but now I have no choice, I need to write a little module for Drupal 7.

So, I was wondering if someone could help me to write this custom module (at least help me to start).

Here is my problem :

I need to send form values to an external database.

For the moment, I managed to tell Drupal that it will need another database (in settings.php, everything is fine here).

Following "http://drupal.stackexchange.com/questions/186301/inserting-data-to-external-database?lq=1 ", I managed to create a little form to add a new line in the external database (using hook_form, hook_form_submit, db_set_active and db_insert).

Now I would like to complete this custom module to achieve this :

  • an user open the node edit form
  • an user submits changes
  • the form is submitted
  • the form values are saved as usual on Drupal database
  • AND the same values are saved on the external database

Finally, I need a module to synchronize Drupal nodes with external database tables.

I suppose this is something totally doable and easy for someone used to Drupal API. Thanks in advance for any help on this.

PS : you may find a first brainstorming on this problem here : How do I edit an external database from the UI?

Related questions

How to define and use an external database connection in a custom module

Working on Drupal 7.54

I am more a site builder than a developer but now I have no choice, I need to write a little module for Drupal 7.

So, I was wondering if someone could help me to write this custom module (at least help me to start).

Here is my problem :

I need to send form values to an external database.

For the moment, I managed to tell Drupal that it will need another database (in settings.php, everything is fine here).

Following "https://drupal.stackexchange.com/questions/186301/inserting-data-to-external-database?lq=1 ", I managed to create a little form to add a new line in the external database (using hook_form, hook_form_submit, db_set_active and db_insert).

Now I would like to complete this custom module to achieve this :

  • an user open the node edit form
  • an user submits changes
  • the form is submitted
  • the form values are saved as usual on Drupal database
  • AND the same values are saved on the external database

Finally, I need a module to synchronize Drupal nodes with external database tables.

I suppose this is something totally doable and easy for someone used to Drupal API. Thanks in advance for any help on this.

PS : you may find a first brainstorming on this problem here : How do I edit an external database from the UI?

Related questions

How to define and use an external database connection in a custom module

Source Link
Toki
  • 424
  • 2
  • 18

How to send values to an external database with a custom module?

Working on Drupal 7.54

I am more a site builder than a developer but now I have no choice, I need to write a little module for Drupal 7.

So, I was wondering if someone could help me to write this custom module (at least help me to start).

Here is my problem :

I need to send form values to an external database.

For the moment, I managed to tell Drupal that it will need another database (in settings.php, everything is fine here).

Following "http://drupal.stackexchange.com/questions/186301/inserting-data-to-external-database?lq=1 ", I managed to create a little form to add a new line in the external database (using hook_form, hook_form_submit, db_set_active and db_insert).

Now I would like to complete this custom module to achieve this :

  • an user open the node edit form
  • an user submits changes
  • the form is submitted
  • the form values are saved as usual on Drupal database
  • AND the same values are saved on the external database

Finally, I need a module to synchronize Drupal nodes with external database tables.

I suppose this is something totally doable and easy for someone used to Drupal API. Thanks in advance for any help on this.

PS : you may find a first brainstorming on this problem here : How do I edit an external database from the UI?

Related questions

How to define and use an external database connection in a custom module