Add additional information

Add additional information

nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
edited November 2012 in Editor
Hi,

When CREATING a new record, I would like to add information to more fields than are shown in the editor form (e.g. generate a user password).

This has to be done server-side (so not through a "hidden" field, because I don't want user passwords shown in the source).

How should I do this?

Thanks,

Nathan

Replies

  • nskwortsownskwortsow Posts: 120Questions: 0Answers: 0
    I will try it with a call triggered onCreate to an external function that I will write myself.
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    Hi Nathan,

    Interesting this came up in another thread earlier today: http://datatables.net/forums/discussion/12534 . Basically you'd just take the _POST array and modify it to include the additional data that you need. That's way the Editor classes don't just assume that you are using _POST, so you can bash the array around as you need (indeed, what you actually pass into the instance would be utterly different from what is submitted!). Obviously the closer to 1:1 mapping the easier since Editor should do it for you, but you can manipulate the input as you need.

    Regards,
    Allan
This discussion has been closed.