Jump to content

Not able to fetch form field labels


Mohit
 Share

Recommended Posts

Hi Team
I am trying to fetch the label of form fields with this api function.

$form = $forms->get('shop-payment-stripe');
        $fieldDefinitions = $form->fields;

If I try to print $fieldDefinitions it shows empty.
Also, if I print $form variable it is surely returning ProcessWire\FormBuilderForm Object.
Any suggestions how to get the form field labels. (Field names are surely accessible from form)

Link to comment
Share on other sites

Thanks Alot @BitPoet. It surely worked.
One more question I have all my form data in an array. I just want to submit my $form and let it do all its functionality that I have assigned in backend with just API.
I have saved its entries with 

$forms->saveEntry( $stripeBillDataArr,$form);

The entries saving part is surely working fine but the form is not sending mail as it was configured to send mail to admin from the backend panel.
I have tried many different functions as well but nothing is working for me.
Any suggestions?
 

 

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
 Share

×
×
  • Create New...