4

I am using an extension that uses the hook "safecracker_submit_entry_start" and "safecracker_submit_entry_end".

The function that handles the callback has a safecracker object argument.

I am wondering if there was any documentation about what that object does.

I would like to do some things with the safecracker form data and I was wondering if this object has the methods/variables to do it.

1 Answer 1

2

There is no documentation that I am aware of. I usually open the safecracker/libraries/Safecracker_lib.php and reference the class itself. The object can be seen pretty plainly this way so you know all the available methods and properties.

I can almost bet that there is a way to do what you want. You can use the hooks in Safecracker to do just about anything. You can even take a look at my Safecracker Registration extension to see how I manipulated the object.

If you have any more questions, just open another thread about the specific task you are trying to accomplish.

3
  • I see. I will into that file. Commented Jan 2, 2013 at 2:16
  • It seems that there is a method, get_field_data(). But when I tried it, it looks like it returns the data about the field, not the actual data. Commented Jan 2, 2013 at 4:16
  • What data are you trying to get specifically? The value of a field from the entry you are editing? Commented Jan 2, 2013 at 15:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.