• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Can't prefill anything

Can't prefill anything 16 years 6 months ago #5459

I used some code snippets from this forum for this task, and found they didn't work.

Then I modified them to be sure, and now all fields should have a value, but it doesn't work either.

Basically I use this right now on form display:
foreach($fields as $i=>$field){
         $fields[$i]->default_value = \"lalalalala\";
}

What do I do wrong? I use the tryout version of RSforms!Pro to see if it fits my needs.
The administrator has disabled public write access.

Re:Can't prefill anything 16 years 5 months ago #5551

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

There is no need to prefill values from the on script display code. Each component has a field called 'Default value', where you place your initial value. You can also execute php code by writting something like this:
//<code>
return 'this is a default value';
//</code>
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Can't prefill anything 16 years 5 months ago #5559

Thank you for your answer.

Yeah, I know I can use those fields to prefill values, but this was just a test.

I plan to use both 'on display' and 'on process' script section not to prefill hardcoded values but database query results, and inserting form data in alternate tables too. I tried some scripts found on this forum that supposedly did that, but didn't work, so I first tried the most basic things to see what wasn't working.

It's both scripts not apparently running that concerns me, and it's unacceptable for my needs.

edit: btw, code embedded in the default value field runs, it's only on display and on process the ones that don't.<br><br>Post edited by: Yossarian, at: 2008/11/14 15:22
The administrator has disabled public write access.

Re:Can't prefill anything 16 years 5 months ago #5568

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
The code snippets you use are intended for RSform!, and you're using RSform! Pro.
I'm pretty sure scripts called on form display and form process do run. Not having the expected result can be caused by lots of things - since it's just raw PHP code and may need some adjustments for your purpose.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Can't prefill anything 16 years 5 months ago #5658

So how managing forms on display is done in RSform!Pro?
And what about on process? Is POST data accessable in the normal PHP way? I can't test it right now.
The administrator has disabled public write access.

Re:Can't prefill anything 16 years 5 months ago #5659

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

$_POST variables are accessible right away in the 'on form process' script area.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!