I'm trying to create a custom form. I've gotten the hang of adding sub blocks and such, and I've been able to find existing examples of a few elements, such as dropdowns and how to populate them.
I've set the form's action with $form->SetAction('filename.php'), but I'm trying to create the submit button and I can't quite figure it out (Short of just making a new Html('<input type="submit">')). Is there another built in way to do this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There's Buttons UIBlock, you can check in ButtonUIBlockFactory the static method MakeForPrimaryAction, it takes these parameters string $sLabel, string $sName = null, string $sValue = null, bool $bIsSubmit = false, ?string $sId = null. I think the fourth parameter , bIsSubmit is what you're looking for.
Hope this helps!
Regards
Stephen
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey there,
I'm trying to create a custom form. I've gotten the hang of adding sub blocks and such, and I've been able to find existing examples of a few elements, such as dropdowns and how to populate them.
I've set the form's action with $form->SetAction('filename.php'), but I'm trying to create the submit button and I can't quite figure it out (Short of just making a new Html('<input type="submit">')). Is there another built in way to do this?
Hi,
There's Buttons UIBlock, you can check in
ButtonUIBlockFactory
the static methodMakeForPrimaryAction
, it takes these parametersstring $sLabel, string $sName = null, string $sValue = null, bool $bIsSubmit = false, ?string $sId = null
. I think the fourth parameter ,bIsSubmit
is what you're looking for.Hope this helps!
Regards
Stephen