placeholder in PHP validation plugin

Incremental

Member
Like described in another post, I get a problem with placeholders
http://fabrikar.com/forums/index.php?threads/how-to-debug-a-php-element-validation-plugin.35298/

I want in my form validation to retreive a value in an element ( ContactsFormID )
So in the element ContactsFormID I put a PHP validation plugin.

If I use $IDinput = '{contacts___ContactsFormID}'; I get the string '{contacts___ContactsFormID}' when I display $IDinput
If I cast $IDinput = (int) '{contacts___ContactsFormID}'; I get the value 0.

How to get the correct field value ?
Thanks
 
Is ContactsFormID a dbjoin element? If so, try

$IDinput = (int) '{contacts___ContactsFormID_raw}';
 
I tried, but it's not working.
This value is the Full Element Name showed in the list.
Could it be a different name in the element itself ?
 
OK, just wasn't sure if you knew about appending "_raw" for things like dbjoins, dropdowns, etc. where you can get either value and label data with the placeholder.
 
Finally it's working with :
$IDinput = (int) $formModel->_formData['contacts___ContactsFormID'];

or Joomla JInput

Is it normal that placeholder do not work ??
 
I was just trying to do something similar with a PHP Validation last night. After reading through the wiki and searching the forum, it does seem that placeholders are not available in this plugin. I'm not sure why that would be though as that syntax is much more user friendly.
 
Looked again in Wiki, there is nothing explicit about placeholders not available.
Could you add a Note in the wiki, with what you found in forums ?

...and we could then ask for placeholders working.
Regards
 
Ooops. I borked the code. Forgot we'd changed how things work in validations in 3.1, so the back ported code for that didn't work in 3.0.

Should be fixed in github now.

-- hugh
 
Thanks for adding placeholder to the PHP Validation Hugh! I added a statement in the wiki on this plugin. Can you update the tooltip in the plugin?

Incremental, I just migrated to Fabrik 3.1 from Fabrik 3 on my site. While I am still working through some transition issues, it does seem to have all the major functionality and the nasty bugs have been worked out. The more users that can jump in and help with testing, the better it will be for everyone!
 
OK, but with 3.0.8 I'm still facing with annoying bugs on basic features.
I would like at least to have a working development !

Do you know if all features and plugins are available in 3.1 ?
 
With the possible exception of 1-2 lesser used plugins, 3.1 has everything 3 does. If you need something just ask to have it migrated. Note that 3.1 uses bootstrap so depending on your setup, migration is not a simple task. If you are developing a site, I'd recommend going with 3.1 to save yourself time later.
 
Thanks for your answer.
I tried on a local site with J2.5 and Yootheme template.
Elements, popups and forms do not render correctly, in backend and frontend.

Even if elements seems to be a little bit better, I worry to go back to 3.0.8 :(
 
I tried Fabrik 3.1 on J2.5 but ran into a lot of issues as well which I assume are related to all the bootstrap stuff. It is supposed to be compatible but I don't think there is much testing to ensure it. I don't think there is much advantage using F3.1 on J2.5 anyway without a bootstrap template. If you need to use J2.5, I would stick with F3.

I ended up going to J3 with F3.1 which worked better after I working through some migration things, most of which were not Fabrik related. Fabrik-wise, the formatting for the date element is different, and there is only one default template (bootstrap). You have to edit each of your lists to change that, leaving as "Use Default" will not work.
 
  • Like
Reactions: rob
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top