Jump to content

How to convert (set your own value) value to display using fieldList and renderForm.

Recommended Posts

Hi prestashopers.

I write a module in which I save information in a complex form - serialized. The display of such information is illegible and unedited, which is why I want to display the input form.

I just wanted to insert a value:

public function renderForm()


             $ unserializedArray = unserialize (AdParameters :: getParametersValue (Tools :: getValue ('id_ad_parameters')));
             $ Result = '';
                 foreach ($ unserializedArray as $ key => $ row) {
                     foreach ($ row as $ element) {
                         $ Result. = '['. $ Element. ']';
                     if (isset ($ unserializedArray [$ key + 1]))
                         $ MyValue. = "\ R \ n";
             $ helper-> fields_value ['parameters_value'] = $ MyValue;



return parent::renderForm();



AdParameters :: getParametersValue() is function quering DB

When I list MyValue everythink is ok but in my list is not ok.

However, it does not change the value.

I need to replace it in the table and when editing in the form.

Can anyone help me with this? Please.


if you need a broader explanation, let me know, I'll send them.

Edited by MenMarcellino (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...